-
word wrap
hi friends,
how to wrap the text . i know i can do it just but setting the wordwrap property to true but i don't wanna do that i want to do it programmatically b'coz i have to add few spaces at the beginnng of every line that is wrapped.
OR
just give me a solution to add spaces at the start of every line in a richtext box control where the text is wrapped.
thanx,
-
You didn't specify which control you were using, Textbox or RichTextbox.
If you are using a TextBox or RichTextbox
Set the Multiline property to true and include a vbCrLf where you want a line break.
If you are using a Label control
Set the WordWrap property to True and include a vbCrLF where you want the line break.
e.g
Code:
With txtData
.Multiline = True
.Text = "This is line one " & vbcrlf & "This is line two"
End With