Bind Form data to popup menu : Popup Menu « Components « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Components » Popup MenuScreenshots 
Bind Form data to popup menu
Bind Form data to popup menu
     

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*">
    <mx:Script>
        
        import mx.controls.Menu;
        public var productMenu:Menu;
        public function initMenu()void
        {
            productMenu = Menu.createMenu(null, Products.Department);
            productMenu.setStyle("disabledColor"0xCC3366);
            productMenu.show(10,10);
        }
      
    </mx:Script>
    <mx:Model id="Products">
        <Root>
            <Department label="{menuName.text}">
                <children label="{item1.text}" />
                <children label="{item2.text}" />
                <children label="{item3.text}" />
            </Department>
        </Root>
    </mx:Model>
    <mx:Button label="Show Products" click="initMenu()" />
    <mx:Form>
        <mx:FormItem label="Third Submenu title">
            <mx:TextInput id="menuName" text="Clothing" />
        </mx:FormItem>
        <mx:FormItem label="Item 1">
            <mx:TextInput id="item1" text="Sweaters" />
        </mx:FormItem>
        <mx:FormItem label="Item 2">
            <mx:TextInput id="item2" text="Shoes" />
        </mx:FormItem>
        <mx:FormItem label="Item 3">
            <mx:TextInput id="item3" text="Jackets" />
        </mx:FormItem>
    </mx:Form>
</mx:Application>

   
    
    
    
    
  
Related examples in the same category
1.Create and show popup menuCreate and show popup menu
2.PopUp Menu Button EventsPopUp Menu Button Events
3.Set popup menu selected itemSet popup menu selected item
www_.___j___a___v_a2s___._c_o_m___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.