Nevron Forum

ContextMenu ?

https://www.nevron.com/Forum/Topic3527.aspx

By Luis Mendes - Thursday, May 13, 2010

I would like to ask if there is anyway I can have the Shapes Library items displayed from a dropdown in the context menu??? Thanks in advance.

Felipe.

By Nevron Support - Wednesday, May 19, 2010

He Luis,

Each library master has a property called ListImage, which will return an image appropriate for a context menu (e.g. with size 16x16). For an example how to create custom commands in context menus check this example:

Nevron Diagram for WinForm examples > Visual Interface Components > Context Menus

So creating a context menu that enumerates the masters of a library is can be achieved quite easily.
Hope this helps - questions or comments - please feel free...
By Luis Mendes - Wednesday, May 19, 2010

Thank you, also how can I iterate over the available layouts to add them to the context menu?
By Nevron Support - Thursday, May 20, 2010

Hi,

You can iterate through all available layouts by means of reflection but for your convenience I post an array containing the currently available layouts:

 

NLayout[] layouts = new NLayout[] {

    new NBalloonTreeLayout(),

    new NBarycenterLayout(),

    new NCompactDepthTreeLayout(),

    new NDockLayout(),

    new NFlowLayout(),

    new NLayeredGraphLayout(),

    new NLayeredTreeLayout(),

    new NOrthogonalGraphLayout(),

    new NRadialGraphLayout(),

    new NSingleCycleLayout(),

    new NSpringLayout(),

    new NStackLayout(),

    new NSymmetricalLayout(),

    new NTableLayout(),

    new NTipOverTreeLayout()

};