Android Question Changing text size of label in Scrollview, text no longer fits

Albi

Active Member
Licensed User
Longtime User
Hello,

I used Klaus's LongText example to build a scrollview with text (found here).

However, when I change the text size of the text in the label, it no longer fits! I tried increasing the height of the label in the designer but this didn't have any effect.
This was the only line of code I added to that example.
B4X:
lblText.TextSize = 20

I couldn't find any similar problems when searching on the forum, so if anyone has any ideas for how to help that would be great.
 

Inman

Well-Known Member
Licensed User
Longtime User
When you changed the height of the label, did you change the height of scrollview.panel accordingly as well?
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Which project do you use.
Without seeing your code it's impossible to give a concrete advice.
Can you upload a small project showing the problem.

Did you have a look at this example LongText, it shows texts with different fonts and sizes ?
 
Upvote 0

Albi

Active Member
Licensed User
Longtime User
Thanks for the reply, I used that exact example which you made and linked to. Where are the texts with different fonts and sizes located?
in that example, with top set to -275 the upper lines of the label don't appear (screenshot attached) and there's a gap at the bottom.
with top set to 30 (so it's below the title label), the top text line is perfect, but the bottom lines don't appear (line 192 is as far as it goes)

I haven't changed anything on the scrollview panel because why should that matter when that's the box within which the scrolling will occur?
 

Attachments

  • Screenshot.png
    Screenshot.png
    83.9 KB · Views: 120
Upvote 0

Albi

Active Member
Licensed User
Longtime User
great, thanks, i've just run it and it works on my phone! i'll go through that and hope to be able to get it to work in my app...

edit: I've had time to go through it and update my app and it now works beautifully. thank you ever so much klaus!
 
Last edited:
Upvote 0
Top