[Gambas-user] Clicking on the scrollbar-arrow-button (down/up) from the ListBox raises doubleclick

Benoit Minisini gambas at ...1...
Wed Aug 24 18:39:55 CEST 2005


On Wednesday 24 August 2005 01:38, Werner Staudacher wrote:
> Hi
>
> When i click with short delays on the scrollbar-arrow-button (down/up)
> from the ListBox, then the doubleclick-event is raised.
> My Code in this event deals with listbox.index wich raises a error if no
> row is selected. With " IF IsNull(listbox.current) THEN RETURN " i could
> trap this error, but when a row is selected  the  event does what he
> should not.
> Any idea?
>
> Thanks, Staudi
>
>

DblClick event is global to the control, and does not know what part of the 
control displays items and what part does not.

You must use the Activate event instead, that is raised, in a ListBox, when 
the user double-clicks on a item, or press enter (or is it space) on the 
item.

Each time you want to catch a double-click, think before if you actually don't 
want to catch the Activate event instead.

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list