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. Image for the cookie policy date

Selected Symbol

Hi, Does anybody know how to determine the currently selected node on a diagram? Thanks

1 Reply

AD Administrator Syncfusion Team October 14, 2004 09:02 AM UTC

Hi Jarrod, You can use the Diagram''s Controller''s SelectionList which returns a list of nodes that are currently selected. Here is a code snippet: if (this.diagram1.Controller.SelectionList.Count>0) { IEnumerator selectednodes= this.diagram1.Controller.SelectionList.GetEnumerator(); string nodename = ""; while (selectednodes.MoveNext()) { INode node = selectednodes.Current as INode; nodename += node.Name.ToString() + "\r"; } MessageBox.Show(nodename, "Currently Selected Node(s)"); } else { MessageBox.Show("No nodes selected", "Currently Selected Node(s)"); } Regards Arun

Live Chat Icon For mobile
Up arrow icon