ContextMenu ?


Author
Message
Luis Mendes
Luis Mendes
Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)
Group: Forum Members
Posts: 25, Visits: 1

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.


Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
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...


Best Regards,
Nevron Support Team


Luis Mendes
Luis Mendes
Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)
Group: Forum Members
Posts: 25, Visits: 1
Thank you, also how can I iterate over the available layouts to add them to the context menu?
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

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()

};

 



Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search