Copy link to clipboard
Copied
Hello, I am having trouble using the FlexNativeMenu component in an AIR desktop app...
It seems the syntax has changed since previous versions of Flex, so I'm not sure how to get this to work.
I have my menu items / data provider as:
[Bindable]
private var menubarXML:XMLList =
<>
<menuitem label="File" data="top">
<menuitem label="Exit" data="QUIT"/>
</menuitem>
<menuitem label="View" data="top">
<menuitem label="MenuItem1" data="mi1"/>
</menuitem>
<menuitem label="Help" data="top">
<menuitem label="Overview" type="check" data="OVERVIEW" />
</menuitem>
</>;
And then I tried to set the menu as such in the MXML:
<mx:Menu>
<mx:FlexNativeMenu id="rrMenu" showRoot="false"
labelField="@label" dataProvider="{menubarXML}"
itemClick="menuHandler(event);" />
</mx:Menu>
This didn't give an error, but shows nothing when I run the program.
So I tried just FlexNativeMenu by itself, but this tells me that it must be placed in Declarations instead of the main stage. So I moved it to Declarations, but it still shows no menu bar...
Copy link to clipboard
Copied
Hello,
You didn't mention which version of Flex you're using, but I suspect it might be 4.5. If so, please see if this helps:
Creating an application or window menu
Thanks,
Chris
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more