The help says:

In Flex, only top-level components in the application can have context menus. For example, if a DataGrid control is a child of a TabNavigator or VBox container, the DataGrid control cannot have its own context menu.

I thought this was rather crappy and almost believed it.  But on a whim I tried it and it seems to work fine.

  grid.contextMenu = new ContextMenu;
  grid.contextMenu.hideBuiltInItems ();
  var item:ContextMenuItem = new ContextMenuItem("Hello World");
  grid.contextMenu.customItems.push(item);

I only get the Hello World item when I right click on my grid, which is a child of a Canvas which is a child of a TabNavigator.

Am I missing something here or is the help just wrong?

Speaking of which, it would be very nice to have actual context menu components so you don't have to do everything in code.

--
Jason __._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to