I've declared a new Ext.SegmentedButton() called "myseg" with a couple of items... In a another function i want to access the badges of each button in "myseg" and change the values... how do I got about doing that? How can I access the "buttons" collection via "myseg" ?
Asked
Active
Viewed 514 times
1 Answers
1
Haven't fully tested my own anser but I believe it is meant to be done through:
Ext.ComponentQuery.query();
This method should return the button components if let's say you do this:
var buttons = myseg.query('button); // return an array of components
and then loop through....
buttons.forEach(function(btn){ btn.setBadge('badgevalue')})

Quickredfox
- 1,428
- 14
- 20