ActiveState Community

Sub-Menu

Posted by sbeckeriv on 2007-04-06 22:00
OS: All / Any

What I am trying to do:
Right click on a folder/file and have a sub menu of commands (Very much like the add but one that is for files and folders)

What I currently Have:

Currently these are at the same level as Copy,Past,Delete in the right click menu in the projects tab.

What I tried:
googling sub menu xul. I did not notice any thing I could use. I looked at the code for the Add (komodo.xul line 152) sub menu but it only appears on folders. I copied the Add sub menu code and alter the names, but that only renamed Add.
I am guessing that the menu tag does build the menu but how do I create a menu item to display the sub menu?

Thanks for any and all help
Stephen becker Iv
sbeckeriv at gmail

shanec | Sat, 2007-04-07 12:35

The following should work:

The project system has an undocumented way to build menu's and commands from JavaScript, but that is likely to change over the next couple releases.

sbeckeriv | Sun, 2007-04-08 18:29

Hello,
I am trying out the code you posted and it does not display the sub menu. It does display the other menuitems before and after the menu tag but never the menu tag. I am using version 4.0.2 of Edit if that matters.

Thank you for your help
Stephen Becker IV

sbeckeriv | Mon, 2007-04-09 17:49

I also just noticed that my commands are on the toolbox right click menu to. Is there away to only display the on the projects tab?

bcorfman | Fri, 2007-04-13 11:47

Ditto to sbecker's comment. I need the same capability -- to only display a right-click menu option inside the Projects tab.