TheSwamp
Code Red => .NET => Topic started by: Peter Laker on June 09, 2009, 05:33:26 PM
-
I'am trying to build a CUI partial menu in .net but can't see how to add submenu's to a pop menu.
In the .net samples for the CUI I can see how to build a cui menu with sub items & a separator but can't find any info on how to add a sub menu to a popmenu.
This code is from the menusample.cs in .net samples
// Add new Items to a PopMenu
private void addItemsToPM(PopMenu pm)
{
PopMenuItem pmi = new PopMenuItem(pm,-1);
pmi.MacroID = "ID_AUGI";pmi.Name = "Autodesk User Group International"; //sub item
pmi = new PopMenuItem(pm,-1); //separator
pmi = new PopMenuItem(pm,-1);
pmi.MacroID = "ID_CustomSafe";pmi.Name = "Online Developer Center"; //sub item
}
-
Guessing here, but try adding another PopMenu to PopMenuItem pmi...
-
Thanks Glenn but no go.
The popmenuitem doesn't contain a definition for a popmenu.
-
You may have to use Windows API calls to do that.
-
Peter, I'm not sure of your Acad version, but it appears that PopMenuRef is what you're after.
-
Thanks Glenn & Draftek, I'm using Autocad 2008.
I will have a play with the PopMenuRef.