3 Replies Latest reply on Nov 27, 2009 8:58 AM by Gregory Lafrance

    Accordion Container

    Deepa Ganesan

      Hi,

       

      Is it possible to display or hide all the children of the accordion container at the same time.

      If so how to achieve this?

       

      Thanks in advance.

        • 1. Re: Accordion Container
          Gregory Lafrance Level 6

          If this post answers your question or helps, please mark it as such.

           

          This code should answer your question:

           

           

          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
            <mx:Script>
              <![CDATA[
                [Bindable] private var visibleVar:Boolean = true;
              ]]>
            </mx:Script>
            <mx:Button label="Toggle Visibility" click="visibleVar=!visibleVar;"/>
            <mx:Accordion creationPolicy="all">
              <mx:VBox id="black" label="Black" width="400" height="100" 
                visible="{visibleVar}" backgroundColor="0x000000" show="black.visible=visibleVar"/>
              <mx:VBox id="blue" label="Blue" width="400" height="100" 
                visible="{visibleVar}" backgroundColor="0x0000FF" show="blue.visible=visibleVar"/>
              <mx:VBox id="green" label="Green" width="400" height="100" 
                visible="{visibleVar}" backgroundColor="0x00FF00" show="green.visible=visibleVar"/>
              <mx:VBox id="red" label="Red" width="400" height="100" 
                visible="{visibleVar}" backgroundColor="0xFF0000" show="red.visible=visibleVar"/>
            </mx:Accordion>
          </mx:Application>
          
          • 2. Re: Accordion Container
            Deepa Ganesan Level 1

            Hi Greg,

             

            I tried the above example. Still i could not view all the boxes in the accordion at the same time.

            My requirement is like all the four children in the accordion should share equal spaces when i view them all.

            Is this possible?

             

            Thanks.

            • 3. Re: Accordion Container
              Gregory Lafrance Level 6

              That's a different matter entirely.

               

              You'll need to extend Accordion. I don't know of any examples, but Google may produce some results.