Using vbCrLf in a Panel Ctrl

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a Label control with some text. I'd like to include some vbCrLf in
this textmass but it doesn't work.

lblTxt.Text = "Some text " & vbCrLf & "some new text..."

Can't I use vbCrLf in Label controls?

I've done it successfully in multiline textboxes, but then the up/down
arrows are rendered with this control.

Any ideas?

TIA

Kenneth P
 
Hi Kenneth

A Panel just renders its contents as HTML. If your HTML contains line
breaks, your browser will just render a space. To achieve line breaks,
you need the corresponding HTML tag which is <br>.

lblTxt.Text = "Some text " & "<br> & "some new text..."

hth, Philipp
 
Use the HTML <br> tag instead.

Example:
lblTxt.Text = "Some text <br> some new text..."
 
Back
Top