Define XML or XMLList object as a direct child of the : Menu Model « Components « Flex






Define XML or XMLList object as a direct child of the

Define XML or XMLList object as a direct child of the <mx:MenuBar>
      
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:MenuBar id="myMenuBar" labelField="@label">
        <mx:XMLList>
            <menuitem label="MenuItem A">
                <menuitem label="SubMenuItem A-1" enabled="False" />
                <menuitem label="SubMenuItem A-2" />
                <menuitem label="SubMenuItem A-3" />
                <menuitem label="SubMenuItem A-4" />
                <menuitem label="SubMenuItem A-5" />
                <menuitem label="SubMenuItem A-6" />
                <menuitem label="SubMenuItem A-7" />
                <menuitem label="SubMenuItem A-8" />
                <menuitem label="SubMenuItem A-9" />
                <menuitem label="SubMenuItem A-10" />
            </menuitem>
            <menuitem label="MenuItem B" type="check" selected="true" />
            <menuitem label="MenuItem C" type="check" selected="false" />
            <menuitem label="MenuItem D">
                <menuitem label="SubMenuItem D-1" type="radio" groupName="one" />
                <menuitem label="SubMenuItem D-2" type="radio" groupName="one" selected="true" />
                <menuitem label="SubMenuItem D-3" type="radio" groupName="one" />
                <menuitem label="SubMenuItem D-4" type="radio" groupName="one" />
                <menuitem label="SubMenuItem D-5" type="radio" groupName="one" />
                <menuitem label="SubMenuItem D-6" type="radio" groupName="one" />
                <menuitem label="SubMenuItem D-7" type="radio" groupName="one" />
                <menuitem label="SubMenuItem D-8" type="radio" groupName="one" />
                <menuitem label="SubMenuItem D-9" type="radio" groupName="one" />
                <menuitem label="SubMenuItem D-10" type="radio" groupName="one" />
            </menuitem>
        </mx:XMLList>
    </mx:MenuBar>
</mx:Application>

   
    
    
    
    
    
  








Related examples in the same category

1.Create a Menu that uses an Array data providerCreate a Menu that uses an Array data provider
2.Use to define the data for the Menu controlUse <mx:XML> to define the data for the Menu control
3.Use XMLListCollection as the data model for MenuBarUse XMLListCollection as the data model for MenuBar
4.Provide Data for MenusProvide Data for Menus
5.Array DataProvider for MenuArray DataProvider for Menu
6.An XML menu data provider with iconsAn XML menu data provider with icons
7.The dataProvider property is the default property of the MenuBar controlThe dataProvider property is the default property of the MenuBar control
8.Create MenuBar from XMLListCreate MenuBar from XMLList
9.Create menu from XMLCreate menu from XML
10.Create Menu from ArrayCreate Menu from Array
11.Dynamically Populate MenusDynamically Populate Menus
12.Model With MenuModel With Menu