0

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" ?

Quickredfox
  • 1,428
  • 14
  • 20

1 Answers1

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