add parent menu item

Having problems with or questions about SheetCam? Post them here.
Post Reply
bcorley
Posts: 14
Joined: Mon Apr 27, 2020 3:47 pm

add parent menu item

Post by bcorley »

Les,
I have made a plugin that adds 2 submenu items using:
app:AddMenu(...)
It puts them under the parent that is in:
app:SetMenuPath("...")
Is there a way to add a parent menu item just to the left of 'Help' so that I can put these 2 submenu items under it?

Thanks,
Butch Corley
User avatar
Les Newell
Site Admin
Posts: 3668
Joined: Thu May 11, 2006 8:12 pm

Re: add parent menu item

Post by Les Newell »

The simplest way to add a menu is to use:

Code: Select all

app:AddMenu("/&My menu")
or:

Code: Select all

app:SetMenuPath("/")
app:AddMenu("&My menu")
This will create a new menu on the menu bar somewhere between Options and Help. Exactly where it appears depends on what other plugins are loaded.

By the way, are you aware of the plugin docs? In your SheetCam installation folder look in the SDK folder. The .i files are text files that list all of SheetCam specific wxLua extensions. In particular sc.i could be quite useful.

When developing plugins it is best to run SheetCam as administrator or install SheetCam outside of program files. That way the built in editor will be able to save your changes. When you save a plugin file the plugin will be automatically reloaded in SheetCam. You also have access to the debugging features of the editor.
bcorley
Posts: 14
Joined: Mon Apr 27, 2020 3:47 pm

Re: add parent menu item

Post by bcorley »

Thanks Les. I wasn't aware of those things. That should help tremendously.
Post Reply