- Home
- Forum
- ASP.NET Web Forms
- Label carriage return
Label carriage return
Label label = new Label()
label.Text = "Test/nCarriage returns";
How can I obtain the same feature on versione 13 of essential studio?
Thanks in advance.
Best regards.
Thanks for using Syncfusion products.
We suggest you to set label’s property Wrapping as Wrap to achieve your requirement. if we misunderstood your requirement, could you please provide us more details such as screenshot of your requirement or describe your requirement in detail? This will help us to verify further and provide a better solution to you. please refer the code snippet below.
Code snippet:
BasicShape node = new BasicShape();
//label creation
Label label = new Label();
label.Text = "Test/nCarriage returns";
label.Wrapping = TextWrapping.Wrap;
node.Labels.Add(label);
DiagramContent.Model.Nodes.Add(node);
Sample:http://www.syncfusion.com/downloads/support/forum/119735/ze/labelsample-1641220341
Please let me know if any concerns.
Regards,
Shyam G
Hi Cosimo
Thanks for using Syncfusion products.
We suggest you to set label’s property Wrapping as Wrap to achieve your requirement. if we misunderstood your requirement, could you please provide us more details such as screenshot of your requirement or describe your requirement in detail? This will help us to verify further and provide a better solution to you. please refer the code snippet below.
Code snippet:
BasicShape node = new BasicShape();
//label creation
Label label = new Label();
label.Text = "Test/nCarriage returns";
label.Wrapping = TextWrapping.Wrap;
node.Labels.Add(label);
DiagramContent.Model.Nodes.Add(node);
Sample:http://www.syncfusion.com/downloads/support/forum/119735/ze/labelsample-1641220341
Please let me know if any concerns.
Regards,
Shyam G
Hi Shyam,
thank you for your answer. I've tested the sample but the result is
Instead I'd like to have
Test
Carriage returns
Best regards.
Thanks for your update.
We suggest you to set the label’s text as “Test\nCarriage returns” to achieve your requirement. Please refer the code snippet below
Code snippet:
BasicShape node = new BasicShape();
//label creation
Label label = new Label();
label.Text = "Test\nCarriage returns";
node.Labels.Add(label);
DiagramContent.Model.Nodes.Add(node);
Please let me know if any concerns.
Regards,
Shyam G
the code you sent me does not work, it shows
Test\ncarriage returns
instead of
Test
carriage returns.
I try to explain bettere the problem: I have a lable inside a node, I know how to have automatic line feed in order to have the label to keep inside the node. I don't kno how to force the line feed at a specific position of the label. For example I have the text "Test carriage return", according to the size of the node I obtain
Test carriage
return
I want to obtain
Test
carriage return.
Thanks for your help.
Best regards
Thanks for your update.
We have created a sample to achieve your requirement and it is available in the below link for download. Please refer the video below
Sample:http://www.syncfusion.com/downloads/support/forum/119735/ze/asp.netsample22274611
Video:http://www.syncfusion.com/downloads/support/forum/119735/ze/labelvideo1317515761
Please let me know if any concerns.
Regards,
Shyam G
thank you. This solved my problem.
Best regards.
Thanks for your update.
Please let us know if you require further assistance on this.
Regards,
Shyam G
- 7 Replies
- 2 Participants
-
CC Cosimo Carbonelli
- Jul 27, 2015 08:44 AM UTC
- Aug 6, 2015 03:56 AM UTC