Where did I double-click?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Where did I double-click?

Stefan Schmiedl
How (and where) can I find out, in which column the mouse pointer was,
when the user double-clicked on a data row in a ListView?

Is there a better way than storing the mouseEvent passed along
by ListView>>onLeftButtonPressed: and analyzing it in the Presenter
method triggered by #actionPerformed?

Thanks,
s.


Reply | Threaded
Open this post in threaded view
|

Re: Where did I double-click?

Esteban A. Maringolo-3
Stefan Schmiedl escribió:
> How (and where) can I find out, in which column the mouse pointer was,
> when the user double-clicked on a data row in a ListView?
>
> Is there a better way than storing the mouseEvent passed along
> by ListView>>onLeftButtonPressed: and analyzing it in the Presenter
> method triggered by #actionPerformed?

Subscribe directly to the view event.

It is:

createSchematicWiring
   "Private - blah blah..."

  super createSchematicWiring.
  self listPresenter view when: #leftButtonPressed send:
#onListLeftButtonPresed: to: self

--
Best regards.


Reply | Threaded
Open this post in threaded view
|

Re: Where did I double-click?

Stefan Schmiedl
On Tue, 22 Nov 2005 11:53:13 -0300, Esteban A. Maringolo wrote:

> Stefan Schmiedl escribió:
>> How (and where) can I find out, in which column the mouse pointer was,
>> when the user double-clicked on a data row in a ListView?
>>
>> Is there a better way than storing the mouseEvent passed along by
>> ListView>>onLeftButtonPressed: and analyzing it in the Presenter method
>> triggered by #actionPerformed?
>
> Subscribe directly to the view event.
>
> It is:
>
> createSchematicWiring
>    "Private - blah blah..."
>
>   super createSchematicWiring.
>   self listPresenter view when: #leftButtonPressed send:
> #onListLeftButtonPresed: to: self

While messing around (TM) with D6, I came upon
        ListView>>basicItemFromPoint:
which also appears in package "SSW Widget Enhancements" as
        ListView>>fullItemFromPoint:

The methods return an instance of LVHITTESTINFO, which can
be queried for its iItem (zero-based row) and iSubitem
(zero-based column).

s.