B4J Question xcustomlistview and label.height

yfleury

Active Member
Licensed User
Longtime User
In xcustomlistview, I have to adjust height of label to fit text

I try label.sizetofit
I try label.height=200dip

I can't find how to adjust height of label to fit to a text

Do you have a solution.
 

Attachments

  • test.zip
    5.1 KB · Views: 121

yfleury

Active Member
Licensed User
Longtime User
Haven't checked your code. You can call CLV.AddTextItem to create a text item at the right size. You can then add more views or see how AddTextItem works and implement it in your own code.
AddTextItem work well. It display all text.

But it add an item in list each time I have to display a long text.

In B4A I can adjust label height with stringUtils.

Maybe, for the holyday, make a wish for have something like su.MeasureMultilineTextHeight(label,label.text)

;)
 
Upvote 0

yfleury

Active Member
Licensed User
Longtime User
I just see I have posted in the wrong forum.
Please move it in IOS forum.
 
Upvote 0
Top