[Gambas-user] ToggleButton issue

Bruce Steers bsteers4 at gmail.com
Fri Feb 18 18:52:23 CET 2022


On Fri, 18 Feb 2022 at 17:40, Bruce Steers <bsteers4 at gmail.com> wrote:

>
>
> On Fri, 18 Feb 2022 at 16:39, Charlie Ogier <charlie at cogier.com> wrote:
>
>> Thanks Fabien but I think you have missed the point. The Action has only
>> been created not activated.
>>
>> Have a look at this example. The problem does not occur with a Button but
>> does with a ToggleButton.
>>
>
> It also occurs with a checkbox
>
> It does not occur with SwitchButton
>
> It seems to be something only checkbox and togglebutton do.
> a checkbox will also link to a togglebutton if they have the same action
>
> BruceS
>


I think you should give them all different Action names and use Group for
your needs.

If you look at the Action wiki help it lists the following properties..
http://gambaswiki.org/wiki/comp/gb.qt4/action

Properties
*Controls <http://gambaswiki.org/wiki/comp/gb.qt4/action/controls>*  *Enabled
<http://gambaswiki.org/wiki/comp/gb.qt4/action/enabled>*  *HasShortcut
<http://gambaswiki.org/wiki/comp/gb.qt4/action/hasshortcut>*  *Picture
<http://gambaswiki.org/wiki/comp/gb.qt4/action/picture>*  *Shortcut
<http://gambaswiki.org/wiki/comp/gb.qt4/action/shortcut>*  *Text
<http://gambaswiki.org/wiki/comp/gb.qt4/action/text>*  *Tooltip
<http://gambaswiki.org/wiki/comp/gb.qt4/action/tooltip>*  *Value
<http://gambaswiki.org/wiki/comp/gb.qt4/action/value>*
*Visible <http://gambaswiki.org/wiki/comp/gb.qt4/action/visible>*

So setting Action["setup"].Text changes ALL objects with action "setup" to
given text.

The same for Action["setup"].Value

So because they share the action string they are linked. as those buttons
represent the same Action. i don't think using the same action string for
things that perform different actions is the way to go m8.

Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220218/91405360/attachment-0001.htm>


More information about the User mailing list