[Gambas-user] Does ListBox ''_MouseDown()" Event work ?
Benoît Minisini
benoit.minisini at gambas-basic.org
Sat Dec 9 13:36:42 CET 2023
Le 09/12/2023 à 11:50, Gianluigi a écrit :
> Il 09/12/23 10:45, Claus Dietrich ha scritto:
>> >/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. This reply made me curious and I would be grateful
>> if somebody can provide some background and help me to understand:
>> What are possible reasons that non-native controls "eat some of the
>> low evel events"? Why should I never try to use events which are a
>> documented capability of a control? Shall I regard it as normal that I
>> can only access an event if I add additional code as proposed by
>> Bruce? I am asking this, because I program controls myself (beginner
>> level) and so far didn't have the experience, that events fail -
>> unless I forgot to raise them. Best regards Claus /
>>
>> ----[http://gambaswiki.org/wiki/doc/netiquette ]----
>
> Hi Claus,
>
> you're not the only one who was baffled by Benoit's response.
>
> We discussed this with other users of the Italian forum and like you we
> are all curious.
>
> With best regards
>
> Gianluigi
>
Controls written in Gambas are usually made with a container and other
controls inside. So the low-level events are the one from that
container, and you usually do not see them, because the inner controls
cover the container.
Controls written in Gambas that are not a container, but based on a
UserControl, usually use the low-level events for their own use, so you
do not see them too.
Is it clearer now?
I don't have a good general solution for this problem at the moment.
I said you should not generally use these events for logical reasons.
For example, if you need the 'MouseDown' event for a ListBox, you may
doing something weird.
Regards,
--
Benoît Minisini.
More information about the User
mailing list