Item click event for PopUpMenuButton : PopUpMenuButton « Components « Flex






Item click event for PopUpMenuButton

Item click event for PopUpMenuButton
     


<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:PopUpMenuButton id="button" 
                        labelField="@label"
                        itemClick="button.label = event.label">
        <mx:dataProvider>
            <mx:XMLListCollection>
                <mx:XMLList>
                    <item label="A">
                        <item label="A1" />
                        <item label="A2" />
                    </item>
                    <item label="B">
                        <item label="B1" />
                        <item label="B2" />
                    </item>
                </mx:XMLList>
            </mx:XMLListCollection>
        </mx:dataProvider>
    </mx:PopUpMenuButton>
</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.Menu Separator for PopupMenuButtonMenu Separator for PopupMenuButton
5.Setup PopupMenuButtonSetup PopupMenuButton
6.Create PopUpMenuButton from ArrayCreate PopUpMenuButton from Array
7.Click event for PopUpMenuButtonClick event for PopUpMenuButton
8.Create a PopUpMenuButton control using an E4X XML data provider.Create a PopUpMenuButton control using an E4X XML data provider.
9.Use PopUpMenuButton change event to set the labelUse PopUpMenuButton change event to set the label
10.Use XMLListCollection as the PopUpMenuButton data sourceUse XMLListCollection as the PopUpMenuButton data source
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