9 Answers, 1 is accepted
0
Accepted
Hello Bob,
Thank you for writing.
There are two ways you can do this:
Kind regards,
Martin Vasilev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Thank you for writing.
There are two ways you can do this:
- Using the designer: Navigate to the Text property, open its dropdown button and put the text on different lines using the Enter key.
- Programmatically: When you set the Text property by code, use the escape sequence "\n" for a new line:
this.radLabel1.Text = "First line \n Second line";
Kind regards,
Martin Vasilev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

Bob
Top achievements
Rank 1
answered on 19 May 2008, 07:06 PM
Thanks, that's the behavior I'm looking for.
Considering usability, it would be much easier if the label supported a dragable border. That way we could resize it while it has text, and it would resize on-the-fly...make it a lot easier than having to find the text property over and over.
Considering usability, it would be much easier if the label supported a dragable border. That way we could resize it while it has text, and it would resize on-the-fly...make it a lot easier than having to find the text property over and over.
0
Hi Bob,
Thank you for writing.
Just like the Microsoft Label, RadLabel cannot be sized by default. In order to apply an arbitrary size to RadLabel, set the AutoSize property to false. By default, in this mode the text is wrapped on multiple lines if the width is not enough to fit the entire text.
If you have any additional questions, please contact me.
Best wishes,
Angel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Thank you for writing.
Just like the Microsoft Label, RadLabel cannot be sized by default. In order to apply an arbitrary size to RadLabel, set the AutoSize property to false. By default, in this mode the text is wrapped on multiple lines if the width is not enough to fit the entire text.
If you have any additional questions, please contact me.
Best wishes,
Angel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

Bob
Top achievements
Rank 1
answered on 20 May 2008, 08:39 PM
I'm following your suggestion when setting the text programatically, but am not seeing the multiple lines.
In designer mode I set the text to be: "First Test" on the first line, and "Second Line" on the second line so that I can know it's changed. Then when I press a button I set this:
RadLabel_Instructions.Text = "AAA BB \n CC DD"
And the result on screen is exactly that - all on one line.
In designer mode I set the text to be: "First Test" on the first line, and "Second Line" on the second line so that I can know it's changed. Then when I press a button I set this:
RadLabel_Instructions.Text = "AAA BB \n CC DD"
And the result on screen is exactly that - all on one line.
0
Accepted
Hi Bob,
The given sample was for C#. If you are using Visual Basic, the code should be:
RadLabel_Instructions.Text = "AAA BB " & Constants.vbLf & " CC DD"
Best wishes,
Angel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
The given sample was for C#. If you are using Visual Basic, the code should be:
RadLabel_Instructions.Text = "AAA BB " & Constants.vbLf & " CC DD"
Best wishes,
Angel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

Bob
Top achievements
Rank 1
answered on 21 May 2008, 12:27 PM
That worked, but I'm curious as to why \n wouldn't work in vb.
Thanks!
Thanks!
0
Hello Bob,
Putting escape characters between the quotation marks is defined by the language. The usage of '\' is specified for C# and combinations like '\n' and '\r' are also language-specific.
Visual Basic does not allow special characters to be put inside a string.
For differences between C# and VB, you may refer to the comparison articles below:
http://www.harding.edu/fmccown/vbnet_csharp_comparison.html#Strings
or
http://www.codeproject.com/KB/dotnet/vbnet_c__difference.aspx
I hope this helps. If you have any further questions, please contact me.
Sincerely yours,
Angel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Putting escape characters between the quotation marks is defined by the language. The usage of '\' is specified for C# and combinations like '\n' and '\r' are also language-specific.
Visual Basic does not allow special characters to be put inside a string.
For differences between C# and VB, you may refer to the comparison articles below:
http://www.harding.edu/fmccown/vbnet_csharp_comparison.html#Strings
or
http://www.codeproject.com/KB/dotnet/vbnet_c__difference.aspx
I hope this helps. If you have any further questions, please contact me.
Sincerely yours,
Angel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

herb
Top achievements
Rank 1
answered on 13 Sep 2017, 02:55 PM
Is there no multiple line or wrap around for the "telerik:Label"?
And for that matter your "textbox" control?
0
Hello Herb,
Thank you for writing.
By default, RadLabel is auto-sized. That is why it is not wrapped. It is necessary to set the AutoSize property to false and specify the size. Here is a sample code snippet:
As to the RadTextBox, it is necessary to enable multiline text:
I hope this information helps. Should you have further questions I would be glad to help.
Regards,
Dess
Progress Telerik
Thank you for writing.
By default, RadLabel is auto-sized. That is why it is not wrapped. It is necessary to set the AutoSize property to false and specify the size. Here is a sample code snippet:
this
.radLabel1.Text =
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce rutrum libero eget aliquam hendrerit. "
;
this
.radLabel1.AutoSize =
false
;
this
.radLabel1.Size=
new
Size(100,100);
As to the RadTextBox, it is necessary to enable multiline text:
this
.radTextBox1.Text =
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce rutrum libero eget aliquam hendrerit. "
;
this
.radTextBox1.Size =
new
Size(100, 100);
this
.radTextBox1.AutoSize =
false
;
this
.radTextBox1.Multiline =
true
;
I hope this information helps. Should you have further questions I would be glad to help.
Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.