Results 1 to 4 of 4

Thread: Setting Text property of Label.

  1. #1

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Setting Text property of Label.

    I have done:
    Code:
    MyLabel.Text = "21 Ebberston Terrace" & vbCrLf & "Hyde Park" & vbCrLf & "Leeds" & vbCrLf & "LS6 4UA"
    Yes the text gets displayed with vbCrLf replaced with " " (space)...how to I multiline it?

    Woka

  2. #2
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131

    Re: Setting Text property of Label.

    If you look at the label in the generated HTML it is simply a span tag. Therefore you need to use <br> (or <br /> if you are using XHTML) instead of vbCrLf as it doesn't automatically convert to HTML.

    HTH

    DJ

  3. #3

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: Setting Text property of Label.

    Yea, it seems that is the case.
    I am amazed though that the Text property of the label doesn't automatically replace vbCrLf with <br>


    Woka

  4. #4
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131

    Re: Setting Text property of Label.

    Yeah you would have thought it would seeing as the Text is always on an HTML page!

    DJ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width