actionscript 3 - menu bar control in flex ,needed to handle separate method for individual menu item -


I need to set fire to different menu items in different ways so that individual items can handle different methods .

And I should know that all types of properties like menu type = "radio" are available in the menu.

  & lt; Mx: menubar id = "jj" labelField = "@ label" itemClick = "menu itemclick (event)" x = "23" y = "228" & gt; & Lt; Mx: XMLList & gt; & Lt; Menuitem label = "file" & gt; & Lt; Menuitem label = "new" type = "radio" /> & Lt; Menuitem label = "open" data = "openfile" type = "check" /> & Lt; Menuitem label = "save" /> & Lt; Menuitem label = "existence" /> & Lt; / MENUITEM & gt; & Lt; / Mx: XMLList & gt; & Lt; / Mx: menubar & gt;  

Can you give a link or example to control the menu bar?

Thanks

   

example allows only three types of permissions:

  1.0" & gt; & Lt ;! - Simple examples for displaying menubar control - & gt; & Lt; Mx: application xmlns: mx = "http://www.adobe.com/2006/mxml" creation end = "init compilation ();" & Gt; & Lt; Mx: script & gt; & Lt ;! [CDATA [import mx.events.MenuEvent; Import mx.controls.Alert; Import mx.collections *; [BinDable] PublicWorkerBollection: XMLListCollection; Private VERSION MENUBOR XML: XMLList = & lt; & Gt; & Lt; Menuitem label = "Menu1" data = "top" & gt; & Lt; Menuitem label = "menu item 1-A" data = "1a" /> & Lt; Menuitem label = "menu item 1-b" data = "1b" /> & Lt; / MENUITEM & gt; & Lt; Menuitem label = "Menu2" data = "top" & gt; & Lt; Menuitem label = "menu item 2-a" type = "check" data = "2a" /> & Lt; Menuitem type = "separator" /> & Lt; Menuitem label = "Menu Itam 2-B" & gt; & Lt; Menuitem label = "Submenuite 3-A" type = "radio" group name = "one" data = "3a" /> & Lt; Menuitem label = "submenuitum 3-b" type = "radio" group name = "one" data = "3b" /> & Lt; / MENUITEM & gt; & Lt; / MENUITEM & gt; & Lt; /> // Initialize MenuBurar Control: Personal Handle Input Compilation (): Zero {menuBarCollection = New XMLListCollection (menubarXML); } // menu handler control item handler for click event. Private Function MenUndler (Event: Menu Event): Open the alert for zero {// menu bar item, which opens a popup submenu if (event.item. @ Data! = "Top") {Alert.show ( "Label:" + event.item label @ "\ n" + "data:" + event.item. @ Data, "click menu item"); }}]] & Gt; & Lt; / Mx: script & gt; & Lt; Mx: panel title = "menubar control example" height = "75%" width = "75%" paddingtop = "10" padding lift = "10" & gt; & Lt; Mx: label width = "100%" color = "blue" text = "select menu item." / & Gt; & Lt; Mx: menubier label field = "@ label" item-click = "menuhandler (event);" DataProvider = "{menuBarCollection}" /> & Lt; / Mx: cell & gt; & Lt; / Mx: Applications & gt;  

Also bookmark this page.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -