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.
Unfortunately, activation email could not send to your email. Please try again.

Drawing a node with multiple text zones

Thread ID:





70811 Jan 2,2008 02:19 PM Jan 4,2008 01:47 AM Windows Forms 1
Tags: Diagram
Ernesto Moscoso Cam
Asked On January 2, 2008 02:19 PM


Suppose that you have to draw a node that has a rectangular shape but is divided "in two" (no need to be symetrical), and it is required to be able to write text in each half. What would you do?

Thanks a lot.

SubhaSheela R [Syncfusion]
Replied On January 4, 2008 01:47 AM

Hi EmoscosoCam,

Thank you for using Syncfusion products.

It is not possible to divide a rectangle into two half. But you can group two rectangle symbols together and then you can write text into that rectangle by placing Textnode in it.
Please refer to the following code snippet:

//To Group nodes
Syncfusion.Windows.Forms.Diagram.Rectangle nodeRect = new Syncfusion.Windows.Forms.Diagram.Rectangle(50, 100, 125, 75);
Syncfusion.Windows.Forms.Diagram.Rectangle nodeRect1 = new Syncfusion.Windows.Forms.Diagram.Rectangle(120, 0, 125, 75);
Syncfusion.Windows.Forms.Diagram.Group grp = new Group();
// Text Node
string text = "Load BitmapNode";
MeasureUnits units = MeasureUnits.Pixel;
Syncfusion.Windows.Forms.Diagram.TextNode txtnode = new TextNode(text);
txtnode.Text = text;
txtnode.SizeToText(new SizeF(400, 400));
((IUnitIndependent)txtnode).SetPinPoint(new PointF(115, 135), units);
string text1 = "Load BitmapNode";
MeasureUnits units1 = MeasureUnits.Pixel;
Syncfusion.Windows.Forms.Diagram.TextNode txtnode1 = new TextNode(text1);
txtnode1.Text = text1;
txtnode1.SizeToText(new SizeF(400, 400));
((IUnitIndependent)txtnode1).SetPinPoint(new PointF(235, 135), units1);

Kindly have a look into the link given below that illustrates the same:
Please let me know if you have any questions.

Subhasheela R


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.

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.