Connector not visible in Group-Node

My line connector node isn't visible if it is added to a group node. Why?


Sample Code
------------------
Group g0 = new Group();
Syncfusion.Windows.Forms.Diagram.Rectangle r0 = new Syncfusion.Windows.Forms.Diagram.Rectangle(10, 10, 400, 400, MeasureUnits.Pixel);
r0.FillStyle.Color = Color.White;
g0.AppendChild(r0);
diagram1.Model.AppendChild(g0);

Group g1 = new Group();
Syncfusion.Windows.Forms.Diagram.Rectangle r1 = new Syncfusion.Windows.Forms.Diagram.Rectangle(10, 10, 100, 100, MeasureUnits.Pixel);
r1.FillStyle.Color = Color.Red;
g1.AppendChild(r1);
g0.AppendChild(g1);

Group g2 = new Group();
Syncfusion.Windows.Forms.Diagram.Rectangle r2 = new Syncfusion.Windows.Forms.Diagram.Rectangle(200, 10, 100, 100, MeasureUnits.Pixel);
r2.FillStyle.Color = Color.Yellow;
g2.AppendChild(r2);
g0.AppendChild(g2);

LineConnector l1 = new LineConnector(new PointF(0, 0), new PointF(1, 0));


// PROBLEM:
//diagram1.Model.AppendChild(l1); // line connector is visible
g0.AppendChild(l1); // PROBLEM: line connector is not visible



g1.CentralPort.TryConnect(l1.TailEndPoint);
g2.CentralPort.TryConnect(l1.HeadEndPoint);

------------------

Best Regards
Josef

6 Replies

MF Meera Fathima Syncfusion Team July 4, 2007 01:45 PM UTC


Hello Josef,

Thanks for the code snippet. It seems the group1 and group2 are not getting added to the diagram model. Please try with the below code snippet and let me know if you still have any issues.

Group g0 = new Group();
Syncfusion.Windows.Forms.Diagram.Rectangle r0 = new Syncfusion.Windows.Forms.Diagram.Rectangle(10, 10, 400, 400, MeasureUnits.Pixel);
r0.FillStyle.Color = Color.White;
g0.AppendChild(r0);

diagram1.Model.AppendChild(g0);

Group g1 = new Group();
Syncfusion.Windows.Forms.Diagram.Rectangle r1 = new Syncfusion.Windows.Forms.Diagram.Rectangle(10, 10, 100, 100, MeasureUnits.Pixel);
r1.FillStyle.Color = Color.Red;
g1.AppendChild(r1);
g0.AppendChild(g1);

diagram1.Model.AppendChild(g1);

Group g2 = new Group();
Syncfusion.Windows.Forms.Diagram.Rectangle r2 = new Syncfusion.Windows.Forms.Diagram.Rectangle(200, 10, 100, 100, MeasureUnits.Pixel);
r2.FillStyle.Color = Color.Yellow;
g2.AppendChild(r2);
g0.AppendChild(g2);

diagram1.Model.AppendChild(g2);
LineConnector l1 = new LineConnector(new PointF(0, 0), new PointF(1, 0));

//diagram1.Model.AppendChild(l1); // line connector is visible
g0.AppendChild(l1); // PROBLEM: line connector is not visible

g1.CentralPort.TryConnect(l1.TailEndPoint);
g2.CentralPort.TryConnect(l1.HeadEndPoint);

Please do let me know if you have any technical questions or I can be of any other assistance. We will be glad to assist you.

Best Regards,
Meera.

Syncfusion, Inc.
http://www.syncfusion.com/



JG Josef Gruber July 5, 2007 07:55 AM UTC

Hello Meera,

Sorry, this code didn't solve my problem.

Group-Node g0 should be the container of the Group-Nodes g1 and g2 and also of the LineConnector l1.
So,
-when g0 is visible, then g1, g2 and l1 are also visible
-when I move g0, also g1, g2 and l1 should be moved.

[Visual Studio 2005, Syncfusion 5.102.0.51]

Best Regards
Josef


MF Meera Fathima Syncfusion Team July 5, 2007 01:39 PM UTC


Hello Josef,

I will look into the details and will get back to you on this on tomorrow or by Monday.

Thanks for your patience.

Best Regards,
Meera.


JG Josef Gruber August 13, 2007 07:32 AM UTC

Hello Meera,

Did you find a solution for my problem?

Best Regards
Josef


MF Meera Fathima Syncfusion Team August 16, 2007 01:40 PM UTC


Hello Josef,

My apologizes for the delayed response. Please find the response below.

Query :

Group-Node g0 should be the container of the Group-Nodes g1 and g2 and also of the LineConnector l1.
So,
-when g0 is visible, then g1, g2 and l1 are also visible
-when I move g0, also g1, g2 and l1 should be moved.

Answer :

We have a problem in drawing links between child nodes of a group. And hence drawing links(l1) after appending the child
nodes(g0 and g1) into the group node(g0) is not working. Please open a new DT incident with the subject of this issue. So that you can get more details about the status of this issue.

Best Regards,
Meera.

Syncfusion, Inc.
http://www.syncfusion.com/


JG Josef Gruber August 23, 2007 12:28 PM UTC

Hi Meera,

Thank for help.
I am going to open a DT incident.

Best Regards,
Josef

Loader.
Up arrow icon