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

Selecting Nodes once added.

I''ve been playing around with the diagram control and can''t figure out why I am unable to select nodes added to the diagram. I''ve done a quick search through the forums but can''t see any one else with the problem I am having. I have a couple of different symbols that are defined as classes (Much like the examples). All of which inherit from the Symbol class. When inserting the symbols I use Dim InsertSym As New InsertNodesCmd InsertSym.Nodes.Add(SymAct) InsertSym.LayerName = diagram_activityDependency.Model.DefaultLayerName InsertSym.Location = New PointF(X, Y) Me.diagram_activityDependency.Controller.ExecuteCommand(InsertSym) The symbols are loaded when the form loads. after which I activate the select tool Me.diagram_activityDependency.ActivateTool("SelectTool") When run, The symbols appear correctly on the diagram and the last one added to the diagram is selected and can be repositioned. The problem: I can''t select any of the other symbols/nodes. If I right click the diagram. The last symbol added becomes deselected and I am unable to select that one also. Do I need to add some code to an event in my symbol class or diagram to activate symbols??? I thought this was the role of the selecttool and the diagram controller??? Thanks for reading.

2 Replies

AD Administrator Syncfusion Team February 15, 2005 11:42 AM

Hi Dan, The Diagram SelectTool is enabled by default, and no extra code is required to be able to select diagram objects. Unless your symbol''s EditStyle.AllowSelect property has been explicitly set to FALSE, you should be able to select the node by clicking on it. It looks like the problem may be tied to certain conditions that are exclusive to your application. Can you please send me a sample that shows the condition? Thanks, Prakash


DA Dan February 15, 2005 11:49 AM

Now that you mentioned the method I spotted it straight away. In the sub new of my custom symbol class I had Me.EditStyle.AllowSelect = false burried with in the code. Thanks for the heads up!

Loader.
Live Chat Icon For mobile
Up arrow icon