-
21 Mar 2013 12:22 PM #1
Unanswered: Working with toggleGroup
Unanswered: Working with toggleGroup
Is there any way to get which button is pressed in a toggle group without iterating over all of them? It's not an object, so I don't think there is...
word
-
21 Mar 2013 8:28 PM #2
Feeling daring?
You can use the private method getPressed() from the private singleton class: Ext.button.Manager by passing the toggleGroup string to it.
Feeling less daring and not wanting to use private methods of private classes?
*Borrowing from getPressed()...
Code:var group = Ext.ComponentQuery.query('[toggleGroup="The-Toggle-Group"]'); Ext.each(group, function (btn) { if (btn.pressed === true) { return btn; } }); return null;


Reply With Quote