We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Moving Links Programatically

Thread ID:

Created:

Updated:

Platform:

Replies:

38161 Dec 7,2005 12:38 PM UTC Dec 8,2005 09:57 PM UTC WinForms 1
loading
Tags: Diagram
Administrator [Syncfusion]
Asked On December 7, 2005 12:38 PM UTC

Case:-1 ---------- I am a NodeCollection that contains 2 Custom Symbols and a Link that connects between these 2 Custom Symbols. When I move the nodes to a different position using the command "diagram.MoveNodes", the Custom Symbols move to the new location. The link stays connected to the Symbols, but it still moves thru the original position before the Symbols were moved. How can I programatically move the Nodes relatively? Case:-2 ------- I am having a point Collection of the link that is connected between 2 symbols. I have to move these selected Symbols Programatically. When the nodes move to a new position I do know the new position of the Symbols. How do I update the PointF[] so that I can redraw the link again? Which is better :- Moving a Link if possible or Updating the PointF[] programatically and redraw the link. Pls let me know. Regards, Vinod

Administrator [Syncfusion]
Replied On December 8, 2005 09:57 PM UTC

Vinod, When a symbol is moved, the links that connect to that symbol will be redrawn at the symbol''s new location. Hence if you have two symbols that are connected by a link, moving the two symbols will result in the link being adjusted to the new position. You do not have to explicitly select the link and apply a move to it as this should happen automatically. The following code shows how to use the MoveCmd to displace two symbols that are connected by a link. Applying the move the link will automatically redraw the link at the new position between the symbols. // Move Symbols sym1 and sym2 connected by a link MoveCmd movcmd = new MoveCmd(50,50); movcmd.Nodes.Add(sym1); movcmd.Nodes.Add(sym2); this.diagramComponent.Controller.ExecuteCommand(movcmd); I tested this condition with the new v 4.1.0.0 beta and it appears to work perfectly. Thanks, Prakash Surendra Syncfusion Inc.,

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;