0
votes

Can we create submenu in context menu in flex web application ?

I am using flex sdk 4.5 and trying to create submenu item under context menu.

 private var myNativeMenu:ContextMenuItem = new ContextMenuItem("Menu",true);
 private var mysubmenu:NativeMenu = new NativeMenu();
 var contextMenu:ContextMenu = new ContextMenu();
 var subMenuItem:NativeMenuItem = new NativeMenuItem("Sub",false);
 subMenuItem.addEventListener(Event.SELECT, updateMe,false,0,true);
 mysubmenu.addItem(subMenuItem);
 myNativeMenu.submenu = mysubmenu;
 contextMenu.customItems.push(myNativeMenu);

Getting following errors :-
- Line no 4. Incorrect number of arguments. Expected no more than 0.
- Line no.6 Call to a possibly undefined method addItem
- Line no.7 Access of undefined property submenu

Is it possible to create submenus in flex web app ?

Thanks

1

1 Answers

0
votes

I see... No, Adobe says it's impossible.

The only thing you can use is a set of menu commands without a submenu group.

enter image description here