MF
Meera Fathima
Syncfusion Team
June 20, 2007 12:12 PM UTC
Hello Daniele Sincich,
Thank you for the code snippet. And regarding your query, if your intension is to place the nodes outside of the diagram bounds, you need to set the Diagram.Model.BoundaryConstraintsEnabled property to false value before appending the nodes into the diagram.
I have tested this case by adding the below sample code snippet in the ControlsGalore sample's Form_Load() method and is working fine for me. I have also given the sample code snippet that I have used for your reference.
this.diagram1.Model.BoundaryConstraintsEnabled = false;
TextBox txtBox = new TextBox();
txtBox.Multiline = true;
txtBox.Text = "This is text in a TextNode";
ControlNode ctrlnode = new ControlNode(txtBox, new RectangleF(100, 1130, 140, 50));
this.diagram1.Model.AppendChild(ctrlnode);
Please try setting the Diagram.Model.BoundaryConstraintsEnabled property to false value and let me know if you still finds any issues with this.
Thanks and Regards,
Meera.
DS
Daniele Sincich
June 20, 2007 03:55 PM UTC
With "Diagram.Model.BoundaryContraintsEnabled = False" the code works well even if the nodes are outside diagram area: added to my code for extreme safety. Many thanks !!!
BTW, in my first post I wrote that the error didn't occur placing all nodes in the same position. It's wrong, in this case only the first node is displayed and all the subsequent nodes in the same Top & Left position were not added to the diagram.
Thank you again and best regars
Daniele