A simple menu bar : MenuBar « Components « Flex






A simple menu bar

A simple menu bar
 

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:XMLListCollection id="myMenuData">
        <mx:XMLList>
            <menuitem label="File">
                <submenu label="New">
                    <submenu label="Pdf" />
                    <submenu label="Doc" />
                </submenu>
                <submenu label="Print" />
            </menuitem>
            <menuitem label="View">
                <submenu label="Pdf" />
                <submenu label="Doc" />
            </menuitem>
        </mx:XMLList>
    </mx:XMLListCollection>
    <mx:MenuBar id="myMBar" dataProvider="{myMenuData}" labelField="@label" />
</mx:Application>

   
  








Related examples in the same category

1.MenuBar based on XMLListMenuBar based on XMLList
2.MenuBar Label fieldMenuBar Label field