Home > Uncategorized > Flex Accordion, Hide/Show Headers

Flex Accordion, Hide/Show Headers

With the Flex Accordion, if you need to hide a tab for any reason, you will try to set the property “visible” of the corresponding container to false and even the “includeInLayout”.
Here an example :

 

<mx:Accordion>

<mx:VBox></mx:VBox>

<mx:VBox visible=”false” includeInLayout=”false”><mx:VBox>

<mx:VBox><mx:VBox>

</mx:Accordion>

 

Sounds logical, but it won’t work. Why ? Because the Accordion, and the other Flex containers like TabNavigator, ViewStack… are not coded in order to permit such behavior.
Since I wanted to have the possibility to hide headers, I opened the code of the Accordion, and created a new version of it wich does the work. You will find it here :

http://code.google.com/p/flex-accordionhideheader/

Categories: Uncategorized Tags: , , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment