I’ve just started playing around with Xojo. I’m trying to determine the potential number of lines of text that a TextArea can display before scrolling. I’m trying something along these lines:
textArea.FontUnit = FontUnits.Pixel
textArea.FontSize = 18
numLines = textArea.Height / textArea.FontSize
This has the issue that I don’t know the pixel spacing between lines, but the result I’m seeing is less lines that the TextArea can show… which suggests that the textArea.FontSize denominator is bigger than it should be even without the lines pacing. So, I’m guessing either height is the wrong thing to use or the fontsize is.
Is there a more robust way that someone can suggest? Especially if the text area is resized by a user on a desktop.
Thanks for your time,