[Gambas-user] Does ListBox ''_MouseDown()" Event work ?

Bruce Steers bsteers4 at gmail.com
Sat Dec 9 15:55:32 CET 2023


[trimmed]

On Sat, 9 Dec 2023 at 13:49, Bruce Steers <bsteers4 at gmail.com> wrote:

>
>
> On Sat, 9 Dec 2023 at 10:51, Gianluigi <gradobag at gradobag.it> wrote:
>
>> 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.
>> *>* >>
>> *>* >>
>> *>* > 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?
>> *
>>
>>
> Like Benoit explained gambas unique controls (from gb.gui.base, and some
> gb.form) are made by using a container, maybe a panel, then various other
> controls placed inside.
>
>
> Possible solutions for us..
> Understand there is a difference with a toolkit control and a gambas
> compound control.  (i guess it should be documented better)
>

I added a warning to UserControl in the wiki..
https://gambaswiki.org/edit/comp/gb.qt4/usercontrol.

*Warning about events:*
Currently a UserControl may not emit all the same events as a Control
<https://gambaswiki.org/edit/comp/gb.qt4/control> or a Container
<https://gambaswiki.org/edit/comp/gb.qt4/container> does, even though the
IDE offers the events in the editor.

The UserControl may be a combination of other controls and some internal
events may or may not be triggered by the overlaying container.

So only the non-inherited events listed for each UserControl can be truly
relied on.
The Events (inherited) part below does not mean those events will trigger.
The control is a container so it technically does have these events but the
part of the control you interact with might not.


feel free to make it make better sense if you feel you can :)
Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231209/a5d86a39/attachment.htm>


More information about the User mailing list