Nevron Forum

Changing default properties

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

By Richard Dubé - Thursday, October 22, 2015

Hi,

I need to change default properties of a tool in DiagramCommandBarsManager.

Did i have to recreate  the tool or i can change it in others way ?

Thanks.
By Nevron Support - Friday, October 23, 2015

Hi,

You can get a tool by name using the GetToolByName method of the drawing view's controller and the NDWFR (abbreviated from NDiagram WinForms Resources) static class which contains constants for tool names. For example, the following piece of code changes the inplace edit tool mouse event from the default left button double click to middle button mouse down:


NInplaceEditTool inplaceEditTool = (NInplaceEditTool)view.Controller.Tools.GetToolByName(NDWFR.ToolInplaceEdit);
inplaceEditTool.InplaceEditMouseEvent = MouseEvent.MiddleButtonDown;