[Gambas-user] Setting properties in a group

Benoît Minisini gambas at ...1...
Fri Feb 20 12:10:18 CET 2009


> Hi all,
>
> I have several buttons on a form, generated using the GUI, not though
> code.  Say their names are "Button1", "Button2" etc - a lot of them.
>
> First, I wanted to share an event handler for all the buttons.  I did
> this putting them all to a group called "Buttons" and using the event
> handler "Buttons_Click".
>
> Now I need to set the properties of all the buttons in the group.
> E.g.: to disable / enable them.  Is there a way to iterate over all
> the buttons belonging to the group "Buttons"?
>
> Thanks in advance.
>
>         Anuradha

There is no direct way to do that. 

But, if, for example, all your buttons have the same container, you can 
iterate it.

Regards,

-- 
Benoît




More information about the User mailing list