|
-
May 12th, 2013, 06:13 PM
#1
Non-Breaking Space in Label Control
Is it possible to have a non-breaking space in a label?
-
May 12th, 2013, 06:39 PM
#2
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!
-
May 12th, 2013, 06:46 PM
#3
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:
 Originally Posted by dunfiddlin
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...
<<<------------
.NET Programming (2012 - 2018)
®Crestron - DMC-T Certified Programmer | Software Developer <<<------------
-
May 12th, 2013, 06:53 PM
#4
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!
-
May 12th, 2013, 07:00 PM
#5
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.
<<<------------
.NET Programming (2012 - 2018)
®Crestron - DMC-T Certified Programmer | Software Developer <<<------------
-
May 13th, 2013, 02:52 AM
#6
Re: Non-Breaking Space in Label Control
 Originally Posted by AceInfinity
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|