Profile Picture

Connector tool.

Posted By michal bandrowski 15 Years Ago
Author
Message
Ivo Milanov
Posted 15 Years Ago
View Quick Profile
Forum Member

Forum Member (35 reputation)Forum Member (35 reputation)Forum Member (35 reputation)Forum Member (35 reputation)Forum Member (35 reputation)Forum Member (35 reputation)Forum Member (35 reputation)Forum Member (35 reputation)Forum Member (35 reputation)

Group: Forum Members
Last Active: 2 Months Ago
Posts: 35, Visits: 15

Hi Michal,

By default the Activate method of the connector tool gets the mouse information directly from the Controller.MouseInfo property. The MouseInfo is automatically updated by the Controller whenever it receives a request to process a certain UI event.

To trick the connector tool you can call the UpdateMouseInfo method of the controller, prior to calling the connector Activate method. For example:


view.Controller.UpdateMouseInfo(new MouseEventArgs(MouseButtons.Left, 1, yourX, yourY, 0), MouseEvent.LeftButtonDown);

connectorTool.Activate();

Best regards,
Ivo



michal bandrowski
questionmark Posted 15 Years Ago
View Quick Profile
Junior Member

Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)

Group: Forum Members
Last Active: 15 Years Ago
Posts: 10, Visits: 1
In Nevron Diagram WinForm Exaples, there is in Diagram Designer a Connector Tool available.
I'd like to add similar one, but when I call for activate, it always adds starting point, and I'm able to define only end point.

How should I activate it to be able to specyfiy with mouse starting point as well?

Ex:
--

NCreateConnectorTool tool = view.Controller.Tools.GetToolByName("Create connector tool") as CreateConnectorTool;
tool.ConnectorType = ConnectorType.SideToSide;

tool.Activate();



Similar Topics


Reading This Topic