[Gambas-user] Menu Group

Benoît Minisini gambas at ...1...
Sun Oct 21 22:50:00 CEST 2012


Le 21/10/2012 11:39, Bill-Lancaster a écrit :
>
> Have 'discovered' the Action property!
> Public Sub Action_Activate(key As String) As Boolean
> ...
> ...
> end
>
> enables me to discover which menu item was clicked and take to appropriate
> action.
>
> Sorry, I know this must be a bit obvious to a lot of people - just thought
> I'd post it anyway
>

A menu is like any Gambas object: when instanciating it with the NEW 
instruction, the AS keyword allows you to define the event handler 
prefix. Then you just have to use the same prefix for all menus 
belonging to the same group (this is how the 'Group' virtual property 
works).

Regards,

-- 
Benoît Minisini




More information about the User mailing list