[Gambas-user] ToggleButton issue

Benoît Minisini g4mba5 at gmail.com
Sat Feb 19 11:36:55 CET 2022


Le 19/02/2022 à 10:53, Charlie Ogier a écrit :
> The idea is to have a collection of ToggleButtons that I can Enable or 
> Disable with a single Action command.
> 
> Here is an example of this working with both Buttons and ToggleButtons
> 
> My question is why when you click a single ToggleButton all the other 
> Togglebuttons Values change. This does not happen with Buttons.
> 

All controls having the same Action property are supposed to trigger the 
same action, and so their value is automatically synchronized as much as 
possible.

A Button does not actually have a value. Setting its value property to 
TRUE is just for triggering its Click event. The value of that property 
is always FALSE.

You usually set the same action to a menu entry and a tool button in a 
toolbar that must do the same thing, sharing their Visible, Enabled, 
Value... properties.

Regards,

-- 
Benoît Minisini


More information about the User mailing list