U unba1300 Guest Apr 13, 2012 #1 When I make a variable equal some text with quotes and then show that in a text box, sometimes that last quote drops to the first position of a new line, which doesn't look very good. Is there a way to prevent that? Thank you.
When I make a variable equal some text with quotes and then show that in a text box, sometimes that last quote drops to the first position of a new line, which doesn't look very good. Is there a way to prevent that? Thank you.
Erel B4X founder Staff member Licensed User Longtime User Apr 14, 2012 #2 Is the text too long? Can you upload a screenshot? Upvote 0
U unba1300 Guest Apr 14, 2012 #3 See how the quote after the word "fools." drops to a new line in the attachment. And some code... Code: Copy sent7b = QUOTE & "They're such a bunch of " & varFoodOrObject(0) & "-lovin' fools." & QUOTE & " " iSent(7) = sent7a & sent7b For i = 1 To 19 sb.Append(iSent(i)) Next txtMainStory.Text = sb Attachments Quotes.jpg 18.5 KB · Views: 407 Upvote 0
See how the quote after the word "fools." drops to a new line in the attachment. And some code... Code: Copy sent7b = QUOTE & "They're such a bunch of " & varFoodOrObject(0) & "-lovin' fools." & QUOTE & " " iSent(7) = sent7a & sent7b For i = 1 To 19 sb.Append(iSent(i)) Next txtMainStory.Text = sb
Erel B4X founder Staff member Licensed User Longtime User Apr 15, 2012 #4 Are you using an EditText of Label? I wasn't able to reproduce it with a Label. Upvote 0
U unba1300 Guest Apr 15, 2012 #5 Hi Erel, I'm using an EditText as the container for the story. If I remember correctly, I did this because I found it didn't matter how long the story was and that I could scroll the EditText up and down, but couldn't do this with a label. Upvote 0
Hi Erel, I'm using an EditText as the container for the story. If I remember correctly, I did this because I found it didn't matter how long the story was and that I could scroll the EditText up and down, but couldn't do this with a label.
NJDude Expert Licensed User Longtime User Apr 15, 2012 #6 You could add the Label to a Scrollview, if the text is larger you will be able to scroll it, search the forums for scrollview sample code, there are plenty. Upvote 0
You could add the Label to a Scrollview, if the text is larger you will be able to scroll it, search the forums for scrollview sample code, there are plenty.
Erel B4X founder Staff member Licensed User Longtime User Apr 16, 2012 #7 You can use StringUtils.MeasureMultilineTextHeight to find the required height of the label. Upvote 0
klaus Expert Licensed User Longtime User Apr 16, 2012 #8 Some example programs: LongTextSimple LongText HelpScrollView Best regards. Upvote 0