I have a screen with a RitchTextField added, which has a custom font applied. I want to find the total number of lines that the RitchTextField can hold to avoid vertical scrolling.
I tried to do this by getting the height of the RichTextField then dividing it by the the height of the font, the problem however is using rtfField.getHeight() always returns the current height of field, and using the screens getHeight() returns the screen size not taking other fields into consideration.
For example:
Screen Size using getHeight() = 360. Font Size using: this.rtfField.getFont().getHeight() = 25 Total Lines ~ 12
However doing a manual count the screen only comfortably displays 8 lines.