CRLF showing up as rectangles in multiline label

Johnny V

Member
Licensed User
Longtime User
I have a label inside of a scrollview... Oh btw I gotta say Hello and a huge THANK YOU for developing an awesome software for those of us that are VBians. Ok back to my question. I have a label inside of a scroll view that does not get created unitil the ScrollView.Panel.Addview(). I have the labeltext being loaded via a json from a mysql database located on the net. Knowing that anything that I have told you prolly has nothing to do with my problem I still wanted to put it out there as info. So the issue that I have is the text that is showing up in the label has the CRLF showing up as rectangles. Basically I am displaying "Hello" & CRLF & "World" and my text shows up as

Hello[]
World

(the two brackets are supposed to look like a rectangle)

Any ideas on how to get rid of them? Oh I loaded the HelpScrollView tutorial and the text in that also has the rectangles in the help listing also, as the attached file shows.
 

Attachments

  • Util.jpg
    Util.jpg
    72.7 KB · Views: 534

Johnny V

Member
Licensed User
Longtime User
Android end of line character is chr(10) (which is equal to the CRLF constant). Are you sure that you are not getting chr(10) & chr(13) (\r\n)?
Not sure. I am just using the app that you have as an example and it is putting the place holder there. It does it on both the emulator and my htc hero.
 
Upvote 0

Johnny V

Member
Licensed User
Longtime User
Ok, thanx.

Tonight I will parse the text coming in (I'm at work and they really have a problem with me doing personal stuff here... I don't know why).

So a

lblNotes.Text= strNotes.Replace(chr(13), "")

Should clear it?

BTW Thanks for all the help.
 
Upvote 0

Johnny V

Member
Licensed User
Longtime User
Thank you for your help. Worked like a charm. Wanted to follow up to say using the code above did the trick!

I did one better tho... I changed the Label to a webview and now I have all sorts of control over what I am displaying.
 
Upvote 0
Top