Nevron Forum

Disable Library Move Tool

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

By Volvick Derose 1 - Monday, August 2, 2010

I cannot find a way to do that at runtime. I can disable it at design time, but not at run time.

NLibraryMoveTool myTool = new NLibraryMoveTool();
myTool.Mode = MoveToolMode.Move;

nLibraryTest.Controller.Tools.Remove(myTool);//get an error here

If I am not mistaken, I remember the pointer tool is a combination of the tool selector and tool move. Let me know if am correct in this case.
By Nevron Support - Monday, August 2, 2010

Hi,

The correct way to disable a tool for a view is the following:

 

view.Controller.Tools.DisableTools(new string[] { NDWFR.ToolSelector });

By Volvick Derose 1 - Tuesday, August 3, 2010

Still doesn't work.

All that I want, disable the library move tooll at runtime

nLibraryView1.Controller.Tools.DisableTools(new string[] { NDWFR.ToolLibraryMove });

When I do that, it does not allow me to drag and drop

At designtime, I have no problem disable it like

controller>tools>collection>mode>DragDrop

 

 

 

By Nevron Support - Tuesday, August 3, 2010

Hi,

Now it is clear what you are trying to do. To make the library move tool allow only drag and drop (and not allow to move the masters inside the library) use the following piece of code:

 

NLibraryMoveTool libMoveTool = (NLibraryMoveTool)libview.Controller.Tools.GetToolByName(NDWFR.ToolLibraryMove);

libMoveTool.Mode = MoveToolMode.DragDrop;

 

By Volvick Derose 1 - Wednesday, August 4, 2010

Thanks, works fine now