Label - Multiline. [Amended]
Hello. A question please. I'd want to fill a label with different texts. Theses texts can have 2 lines. Can I set the number of characters in each line of the label ?
Thanks...
Hello. A question please. I'd want to fill a label with different texts. Theses texts can have 2 lines. Can I set the number of characters in each line of the label ?
Thanks...
Hi,
Do the following instead.>>
Drag a textbox to your form.
Set the following properties to TRUE.
ReadOnly=True
MultiLine=True
Then drag the vertical height of your textbox and adjust the width to suit the font and text you are using.
Adjust the textposition property to Center if you want too.
In code
textbox1.text="This is line 1" & VbCrLf
textbox1.AppendText("This is line 2")
Hope that helps?
Regards,
S_DS
Label1.Text =
"First Line" & vbCrLf & "Second Line"works just fine and gives you a two line label.If you want to set the number of characters on each line just use the String.Substring method to split it.
Hi,
To Dave299.
I've never tried the &VBCrLf on a label. ![]()
Thanks, that's something else i now know. ![]()
I'd personally still prefer my 1st method as you can then
more easily setup mutiple lines of text at design time.
Regards,
S_DS