View Full Version : Button toggleGroup problem - No buttons depressed

12 Feb 2013, 7:31 AM
I have a toolbar with three buttons.

Each button has:

allowDepress: true,
enableToggle: true,
toggleGroup: "buttonGroup1"

One button is initially pressed.

My problem occurs when the button which is already depressed is clicked, it becomes unpressed. This leaves no buttons in the Depressed state. I would like one button to always be depressed because one option must always be turned on.

A config option such as "ignoreClickIfAlreadyPressed" (yes, a terribly long name) would be what I am looking for. I do not see it in the existing config options.

Am I missing something or do I need to look into overriding "button"?


13 Feb 2013, 8:51 PM
You'd probably have to extend/override the button and check if it's the only button currently pressed and cancel if it is.