Results 1 to 2 of 2

Thread: Button toggleGroup problem - No buttons depressed

  1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Hillsborough, NC
    Posts
    429
    Answers
    3

    Default Button toggleGroup problem - No buttons depressed

    I have a toolbar with three buttons.

    Each button has:
    Code:
    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"?

    Worth

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    You'd probably have to extend/override the button and check if it's the only button currently pressed and cancel if it is.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •