Monday, January 18, 2010

Creating a vertical ToggleButtonBar in Flex

The following example creates a ToggleButtonBar control in Flex and sets its toggleOnClick property to true.

According to the Flex 2.0.1 documentation:

If you set the toggleOnClick property of the ToggleButtonBar container to true, selecting the currently selected button deselects it. By default the toggleOnClick property is set to false.

You can check out the different behaviors of the toggleOnClick property by selecting or deselecting the check box in the upper left corner. Likewise, you can change the ToggleButtonBar control’s direction property by changing the selected value in the combo box in the upper-right corner. If the toggleOnClick property is set to true and you deselect a button in the ToggleButtonBar control, the ToggleButtonBar control’s selectedIndex property is set to -1 and the Flex application sets the ViewStack container’s visible property to false.

Full code after the jump.


flex ToggleButtonBar

No comments:

Post a Comment

Your comments is appreciate.