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.

Multiline Label

Thread ID:

Created:

Updated:

Platform:

Replies:

94389 May 10,2010 09:32 PM May 14,2010 09:14 AM Windows Forms 1
loading
Tags: Diagram
Administrator [Syncfusion]
Asked On May 10, 2010 09:32 PM

If a diagram label has a lot of text, how do I get it to word wrap? Currently it is printing on one line and extends beyond the symbol borders.

There is a whole section in the product description page dedicated to Multiline Labels:

http://www.syncfusion.com/products/user-interface-edition/wpf/diagram/multiline-label

BUT, I can't find any such properties in the version I have installed 8.2.0.18.

Melba Winshia [Syncfusion]
Replied On May 14, 2010 09:14 AM

Hi David,

Thank you for contacting Syncfusion Support.

We do not have WrapText property for Label. But as a workaround you can use carriage return to achieve this:

[VB]

Dim label As Syncfusion.Windows.Forms.Diagram.Label = New Syncfusion.Windows.Forms.Diagram.Label()
label.Text = "Syncfusion" & Constants.vbCrLf & "Text"
rect.Labels.Add(label)

Please refer to the following sample which illustrates this:

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=WrapText_Label-1867460281.zip

We suggest that you use TextNode instead of Label, since label has few limitations in terms of usage of properties. TextNode was implemented considering these limitations and also we have 'WrapText' property for TextNode.

Please refer to the following code snippet that illustrates how to use a TextNode and append it :


[VB]

Dim CaptionField As Syncfusion.Windows.Forms.Diagram.TextNode = New Syncfusion.Windows.Forms.Diagram.TextNode("large text large text large text", New RectangleF(10, 30, 90, 40))
CaptionField.LineStyle.LineColor = Color.Transparent
CaptionField.HorizontalAlignment = StringAlignment.Center
CaptionField.VerticalAlignment = StringAlignment.Center
CaptionField.WrapText = True
CaptionField.PinPoint = outershape.PinPoint


Also, I have created a sample which illustrates this,

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=TextNode_Wrap740056323.zip

Note: In the above sample, I have used Wrap Text property only for first node.

Please let me know if this helps.

Thanks,
Melba


CONFIRMATION

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.

;