[Gambas-user] Does ListBox ''_MouseDown()" Event work ?
Bruce Steers
bsteers4 at gmail.com
Fri Dec 8 14:28:18 CET 2023
On Fri, 8 Dec 2023 at 13:13, Benoît Minisini <
benoit.minisini at gambas-basic.org> wrote:
> Le 08/12/2023 à 14:06, T Lee Davidson a écrit :
> > On 12/7/23 20:13, vuott--- via User wrote:
> >> Hello,
> >> the ListBox ''_MouseDown()" Event does not work for me.
> >>
> >>
> >> [System]
> >> Gambas=3.18.90 38b49c0 (master)
> > [snip]
> >
> > The issue exists with v3.18.4 as well. Interestingly, a double-click
> > triggers the MouseDown event with both Qt5 and GTK3.
> >
>
> Compound non-native controls usually eat some of the low-level events.
>
> You should normally never try to handle low-level events on complex
> controls.
>
> Regards,
>
> --
> Benoît Minisini.
>
We can always access the inner parts of complex controls, something like
this...
' Gambas class file
Public Sub Form_Open()
Dim hobs As Observer = New Observer(ListBox1.Children[0]) As
"ListBox1Inner"
End
Public Sub ListBox1Inner_MouseDown()
Object.Raise(ListBox1, "MouseDown")
Stop Event ' stop further triggers
End
' Now ListBox1_MouseDown works
Public Sub ListBox1_MouseDown()
Debug "got mousedown"
End
Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231208/0687e7b6/attachment.htm>
More information about the User
mailing list