Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

Using FlexNativeMenu in AIR desktop app

Explorer ,
Aug 14, 2011 Aug 14, 2011

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...

TOPICS
Performance issues
477
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 15, 2011 Aug 15, 2011
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines