[Gambas-user] Grouped control's events are overshadowed by the Group events

T Lee Davidson t.lee.davidson at gmail.com
Tue Sep 26 20:41:35 CEST 2023


On 9/26/23 14:31, Benoît Minisini wrote:
> Le 26/09/2023 à 20:23, T Lee Davidson a écrit :
>> In a project I have some ValueBoxes that I have grouped so that I can perform the same action on any one of them for the same 
>> event. But, I want only one of them to do something different for a different event.
>>
>> However, the individual control's event handlers are not triggered when an event handler for the group exists.
>>
>> Is this by design, or a bug?
>>
>> Small demo project attached.
>>
> 
> This is by design. There is no "individual" or "group" event handlers. Each object has its own event handlers, all using the 
> same prefix. It's just that two different objects can use the same prefix (I named these prefix "event names", not a beautiful 
> choice).

I'm not sure I quite understand what you mean by the "prefix". What I think you mean is that if objects are grouped, then they 
would all use the same prefix in the event handler name.

But, regardless if I am understanding that correctly, if the behavior is by design, then I would need to create an event handler 
for the group and test Last.Name to determine whether or not to take action.


-- 
Lee



More information about the User mailing list