Page 1 of 1

add parent menu item

Posted: Tue Nov 14, 2023 11:43 pm
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

Re: add parent menu item

Posted: Wed Nov 15, 2023 11:12 am
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.

Re: add parent menu item

Posted: Wed Nov 15, 2023 12:53 pm
by bcorley
Thanks Les. I wasn't aware of those things. That should help tremendously.