accordion--Navigator

Source: Internet
Author: User

Describes the use of the navigator.

Create a new Mxml file named Accordion.mxml. The following is the detailed code for this file.

<?xml version= "1.0" encoding= "Utf-8"?>
<mx:application xmlns:mx= "Http://www.adobe.com/2006/mxml" layout= "vertical"
verticalalign= "Top" horizontalalign= "center" paddingtop= 0 "fontfamily=" Arial "fontsize=" Backgroun " Dgradientcolors= "[0x000000,0x323232]"
>
<mx:panel title= "Navigator Container Example" layout= "vertical" color= "0xFFFFFF" borderalpha= "1" width= "$" height= "500"
paddingtop= "2" paddingright= "ten" paddingbottom= "paddingleft=" horizontalalign= "center"
>
<mx:label width= "100%" color= "0x323232"
text= "Please select any of the buttons below to change the panel of the Navigation container"/>
<mx:hbox color= "0x323232" >
<mx:button label= "Select the first panel" click= "Accordion.selectedindex=0"/>
<mx:button label= "Select a second panel" click= "Accordion.selectedindex=1"/>
<mx:button label= "Select a third panel" click= "accordion.selectedindex=2"/>
</mx:HBox>

<mx:accordion id= "Accordion" color= "0x323232" width= "100%" height= "50%" selectedindex= "2" >
<mx:vbox label= "Click the first button" >
<mx:label text= "first panel of container"/>
</mx:VBox>
<mx:vbox label= "Click the second button" >
<mx:label text= "container second panel"/>
</mx:VBox>
<mx:vbox label= "Click the third button" >
<mx:label text= "Third panel of the container"/>
</mx:VBox>
</mx:Accordion>

<mx:label width= "100%" color= "0x323232"
text= "Accordion can not be formed horizontally (in the form of left and right navigation container), can only form a navigation container in the upper and lower forms"/>
<mx:accordion id= "haccordion" color= "0x323232" width= "100%" height= "50%" selectedindex= "2" >
<mx:hbox label= "Click the first button" >
<mx:button label= "Select the first panel" click= "Accordion.selectedindex=0"/>
<mx:button label= "Select a second panel" click= "Accordion.selectedindex=1"/>
<mx:button label= "Select a third panel" click= "accordion.selectedindex=2"/>
</mx:HBox>
<mx:hbox label= "Click the first button" >
<mx:button label= "Select the first panel" click= "Accordion.selectedindex=0"/>
<mx:button label= "Select a second panel" click= "Accordion.selectedindex=1"/>
<mx:button label= "Select a third panel" click= "accordion.selectedindex=2"/>
</mx:HBox>
</mx:Accordion>

</mx:Panel>

</mx:Application>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.