Menu Separator for PopupMenuButton : PopUpMenuButton « Components « Flex






Menu Separator for PopupMenuButton

Menu Separator for PopupMenuButton
  

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Script>
    
    import mx.controls.Menu
    private function initMenuData():void {
        Menu(popupMB.popUp).selectedIndex=2;
    }
  
    </mx:Script>
    <mx:XML id="fileMenuChoices" format="e4x">
        <root>
            <fileItem label="New"/>
            <fileItem label="Open"/>
            <fileItem label="Save"/>
            <separator type="separator"/>
            <fileItem label="Exit"/>
        </root>
    </mx:XML>
    <mx:PopUpMenuButton id="popupMB"
                        showRoot="false"
                        labelField="@label"
                        dataProvider="{fileMenuChoices}"
                        creationComplete="initMenuData();"/>
</mx:Application>

   
    
  








Related examples in the same category

1.Setup data provider for PopUpMenuButtonSetup data provider for PopUpMenuButton
2.PopUpMenuButton click eventPopUpMenuButton click event
3.Hard code data provider for PopUpMenuButton
4.Setup PopupMenuButtonSetup PopupMenuButton
5.Create PopUpMenuButton from ArrayCreate PopUpMenuButton from Array
6.Click event for PopUpMenuButtonClick event for PopUpMenuButton
7.Create a PopUpMenuButton control using an E4X XML data provider.Create a PopUpMenuButton control using an E4X XML data provider.
8.Use PopUpMenuButton change event to set the labelUse PopUpMenuButton change event to set the label
9.Use XMLListCollection as the PopUpMenuButton data sourceUse XMLListCollection as the PopUpMenuButton data source
10.Item click event for PopUpMenuButtonItem click event for PopUpMenuButton
11.PopUpMenuButton and XMLList data providerPopUpMenuButton and XMLList data provider
12.how the PopUpMenuButton generates events and how an application can handle themhow the PopUpMenuButton generates events and how an application can handle them
13.Creating a PopUpMenuButton controlCreating a PopUpMenuButton control
14.To use a dynamic label property, use a PopUpMenuButton control change event listenerTo use a dynamic label property, use a PopUpMenuButton control change event listener