alirezahassan Active Member Licensed User Dec 28, 2020 #1 hi all, I set a long text to my label in b4j. and i want to get text height. In b4a i use 'StringUtils' Library but in b4j 'JStringUtils' Library dosn't have MeasureMultilineTextHeight! what should i do?
hi all, I set a long text to my label in b4j. and i want to get text height. In b4a i use 'StringUtils' Library but in b4j 'JStringUtils' Library dosn't have MeasureMultilineTextHeight! what should i do?
Erel B4X founder Staff member Licensed User Longtime User Dec 28, 2020 #2 Best solution is to use xCLV.AddText. Second best solution is: Measure Multiline Text Height Upvote 0
Star-Dust Expert Licensed User Longtime User Dec 28, 2020 #3 use B4XCanvas.MeasureText to measure height and width in cross platform B4X: Dim Rec As B4XRect = Can.MeasureText(txt,xui.CreateDefaultFont(dt)) log(Rec.Width) log(Rev.Height) Upvote 0
use B4XCanvas.MeasureText to measure height and width in cross platform B4X: Dim Rec As B4XRect = Can.MeasureText(txt,xui.CreateDefaultFont(dt)) log(Rec.Width) log(Rev.Height)