This content has been marked as final. Show 6 replies
There's a toggleOnClick property that lets the user select and deselect the same button, so you can set thisproperty to true and then try to set the selectedIndex to -1.
According to the documentation, the toggleOnClick property:
Specifies whether the currently selected button can be deselected by the user. By default, the currently selected button gets deselected automatically only when another button in the group is selected. Setting this property to true lets the user deselect it. When the currently selected button is deselected, the selectedIndex property is set to -1.
The default value is false.
i cant find this property to be set programatically...
if you have any idea please guide me....
by using the above option we can deselect the button only on clicking it..
But i want it to be deselected on the loading time itself...
so, how to set that property using scipts
I think you are going to need to use a custom component which extends from ToggleButtonBar, because you will need to call a function named hiliteSelectedNavItem( index:int ) to do that.
Here's the documentation on the ToggleButtonBar, there you will see the method i just mentioned, but since it is protected you will need to create a custom component, extend the ToggleButtonBar and then have it call the function.
This was a recognized bug that has been fixed in the newer releases of the Flex 3 SDK. You can go here to get a newer version of the Flex SDK:http://www.adobe.com/products/flex/flexdownloads/