[Gambas-user] Disable right click popup menu of textbox
Gianluigi
bagonergi at gmail.com
Thu Oct 1 22:19:54 CEST 2020
Il giorno gio 1 ott 2020 alle ore 18:38 T Lee Davidson <
t.lee.davidson at gmail.com> ha scritto:
> On 10/1/20 3:44 AM, Gianluigi wrote:
> > We create a new class every time, why does the menu have to be different
> from the other properties?
>
> Yes, we create a new clastextbox object every time. It's not the menu that
> needs to be different. It is the menu's *event name*
> that, apparently, needs to be unique. The event name is exposed to the
> parent Form which is the event handler.
>
> How does the event handler know which component raised the event if the
> event name is the same for all distinct objects?
>
> If the menu was assigned in the Form's scope, then it would know. But, the
> menu assignment details are 'hidden' from the Form in
> a separate class. All the Form, the event handler, knows (other than what
> is exposed by .Proxy) is the event name. I suspect it
> has to use an event-name lookup table to determine the associated object,
> and returns with the first one it finds. (I invite
> corrections.)
>
Hi Lee,
what you say makes a lot of sense I hope Benoit wants to deepen.
Regards
Gianluigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20201001/e0839a55/attachment.htm>
More information about the User
mailing list