Page 1 of 1

Creating a two-level submenu

PostPosted: Fri Mar 24, 2006 7:03 am
by Raul Lorenzo
Hello,

I am trying to create a submenu into a submenu, something like that

Tools (Main MagicDraw Menu)
->PlugInREM
->Export....
->Import....
->Options
->Refresh Presentation
->Show/Hide.....
->.......

But I don´t get it.
I am doing this:
private NMAction getSeparatedActions()
{
ActionsCategory category = new ActionsCategory(null, "REM PlugIn");
// this call makes submenu.
category.setNested(true);
category.addAction(new SimpleAction(null, "Importar..."));
category.addAction(new SimpleAction(null, "Exportar diagramas..."));

ActionsCategory category_opciones = new ActionsCategory(null, "Opciones
Presentacin...");
category.addAction(category_opciones);
category.addAction(new SimpleAction(null, "Sobre PlugInREM..."));
return category;
}
Should I create another MenuConfigurator instante like in example from
MagicDraw plugins examples?

Thanks in advance

Re: Creating a two-level submenu

PostPosted: Sun Mar 26, 2006 11:15 am
by Raul Lorenzo
Hello,

I got it, if someone is interested, I attached the code to do that.

> Hello,
>
> I am trying to create a submenu into a submenu, something like that
>
> Tools (Main MagicDraw Menu)
> ->PlugInREM
> ->Export....
> ->Import....
> ->Options
> ->Refresh Presentation
> ->Show/Hide.....
> ->.......
>
> But I don´t get it.
> I am doing this:
> private NMAction getSeparatedActions()
> {
> ActionsCategory category = new ActionsCategory(null, "REM PlugIn");
> // this call makes submenu.
> category.setNested(true);
> category.addAction(new SimpleAction(null, "Importar..."));
> category.addAction(new SimpleAction(null, "Exportar diagramas..."));
>
> ActionsCategory category_opciones = new ActionsCategory(null, "Opciones
> Presentacin...");
> category.addAction(category_opciones);
> category.addAction(new SimpleAction(null, "Sobre PlugInREM..."));
> return category;
> }
> Should I create another MenuConfigurator instante like in example from
> MagicDraw plugins examples?
>
> Thanks in advance