June 29, 2009

Dynamically add or remove the ToggleButton controls in Flex

Hi,
We can dynamically add the button controls into toggle button controls by following way

var obj:Object = new Object();
obj.icon = _iconArray[_buttonIndex];
_buttonArray.push(obj);
_togg.dataProvider = _buttonArray;

as well as we can remove the button controls from the toggle buttoncontrols by following way

_buttonArray.pop();
_togg.dataProvider = _buttonArray;

No comments:

Post a Comment