Results 1 to 6 of 6

Thread: Non-Breaking Space in Label Control

  1. #1

    Thread Starter
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Non-Breaking Space in Label Control

    Is it possible to have a non-breaking space in a label?

  2. #2
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: Non-Breaking Space in Label Control

    No. It's plain text. You should be able to get what you want out of a read-only RichTextBox though.
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  3. #3
    Fanatic Member AceInfinity's Avatar
    Join Date
    May 2011
    Posts
    696

    Re: Non-Breaking Space in Label Control

    Actually you can, just cast 160 to a char value.   translates to a char value of 160 I believe. Why do you want that though?

    edit:
    Quote Originally Posted by dunfiddlin View Post
    No. It's plain text. You should be able to get what you want out of a read-only RichTextBox though.
    It might be but   doesn't stay that as plain text after it's viewed on a webpage though, so it's still translated to something. That's just an encoding...
    <<<------------
    Improving Managed Code Performance | .NET Application Performance
    < Please if this helped you out. Any kind of thanks is gladly appreciated >


    .NET Programming (2012 - 2018)
    ®Crestron - DMC-T Certified Programmer | Software Developer
    <<<------------

  4. #4
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: Non-Breaking Space in Label Control

    Drat, wrong again! I can see a need for it if you're using a fixed size label and varying text though.
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  5. #5
    Fanatic Member AceInfinity's Avatar
    Join Date
    May 2011
    Posts
    696

    Re: Non-Breaking Space in Label Control

    I don't know too much about it, I found the char code via the HttpUtility class from the System.Web namespace though. It seems to stick too when using it in the Text property of a label. There's no weird trimming of that Chr(160) back to a regular space or anything odd like that. Don't blame me for making sure of things lol.
    <<<------------
    Improving Managed Code Performance | .NET Application Performance
    < Please if this helped you out. Any kind of thanks is gladly appreciated >


    .NET Programming (2012 - 2018)
    ®Crestron - DMC-T Certified Programmer | Software Developer
    <<<------------

  6. #6

    Thread Starter
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Non-Breaking Space in Label Control

    Quote Originally Posted by AceInfinity View Post
    Actually you can, just cast 160 to a char value
    thanks

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