F Fotios Georgiadis Member Licensed User Longtime User Dec 27, 2019 #1 Hello! Is there any way on how I find the optimized height of my label? I want to define my scrollview's height.
Hello! Is there any way on how I find the optimized height of my label? I want to define my scrollview's height.
klaus Expert Licensed User Longtime User Dec 27, 2019 #2 You speak of Label and ScrollView heights. You need to give more information on how many Labels in the ScrollView and how they are added. Then there is a difference between ScrollView.Height and ScrollView.Panel.Height! Upvote 0
You speak of Label and ScrollView heights. You need to give more information on how many Labels in the ScrollView and how they are added. Then there is a difference between ScrollView.Height and ScrollView.Panel.Height!
JohnC Expert Licensed User Longtime User Dec 27, 2019 #3 Maybe you can use this code: B4X: Dim SU As StringUtils Dim ItemHeight As Int = SU.MeasureMultilineTextHeight(MyLabel, MyLabel.Text) To find out the required height for the label, then calculate the scrollview.panel.height based on that. Upvote 0
Maybe you can use this code: B4X: Dim SU As StringUtils Dim ItemHeight As Int = SU.MeasureMultilineTextHeight(MyLabel, MyLabel.Text) To find out the required height for the label, then calculate the scrollview.panel.height based on that.
Erel B4X founder Staff member Licensed User Longtime User Dec 29, 2019 #4 Fotios Georgiadis said: Is there any way on how I find the optimized height of my label? I want to define my scrollview's height. Click to expand... Use xCustomListView.AddTextItem. Upvote 0
Fotios Georgiadis said: Is there any way on how I find the optimized height of my label? I want to define my scrollview's height. Click to expand... Use xCustomListView.AddTextItem.
F Fotios Georgiadis Member Licensed User Longtime User Dec 30, 2019 #5 Thank you for your advices. I solved my problem with JohnC's way! Upvote 0