I have been successful so far in adding a custom menu to the main toolbar and adding a button to that menu. What I am struggling with is how to add a custom sub-menu to my existing menu.
Here is the code I have:
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
try {
curSession = pfcGlobal.GetProESession();
curSession.UIAddMenu("TopMenu1", "Help", "test.txt", null);
UICommand cmd = curSession.UICreateCommand("JL.HelpMenuApp",new MenuButtonListener());
curSession.UIAddButton(cmd, "TopMenu1", null, "SubButton1", "SubButton1Help", "test.txt");
curSession.UIAddMenu("SubMenu1", "SubButton1", "test.txt", "TopMenu1");
}</BLOCKQUOTE>
I'm basically trying to add a new menu called "SubMenu1" to main menu "TopMenu1". It compiles OK but when I start Pro/E, I only get TopMenu1 with SubButton1. SubMenu1 does not appear.
Any help is much appreciated.
Here is the code I have:
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
try {
curSession = pfcGlobal.GetProESession();
curSession.UIAddMenu("TopMenu1", "Help", "test.txt", null);
UICommand cmd = curSession.UICreateCommand("JL.HelpMenuApp",new MenuButtonListener());
curSession.UIAddButton(cmd, "TopMenu1", null, "SubButton1", "SubButton1Help", "test.txt");
curSession.UIAddMenu("SubMenu1", "SubButton1", "test.txt", "TopMenu1");
}</BLOCKQUOTE>
I'm basically trying to add a new menu called "SubMenu1" to main menu "TopMenu1". It compiles OK but when I start Pro/E, I only get TopMenu1 with SubButton1. SubMenu1 does not appear.
Any help is much appreciated.