Bug TextBox auto height incorrectly calculated
#1
When setting the height of a textbox to auto the size is incorrectly calculated if the font you are using has a line spacing greater than 1.

xml:
<font>
  <name>body</name>
  <filename>Inter-Medium.ttf</filename>
  <size>28</size>
  <linespacing>1.2</linespacing>
  <aspect>1.04</aspect>
</font>

<control type="textbox" id="9">
  <height max="800">auto</height>
  <font>body</font>
  <textcolor>white</textcolor>
  <align>center</align>
  <label>Line1[CR]Line2[CR]Line3</label>
  <autoscroll time="3000" delay="4000" repeat="5000">Container(9).HasNext</autoscroll>
</control>

This textbox scrolls even though the text never exceeds the max height of 800. The auto height is calculated too small and Container(9).HasNext returns true.

If I set the linespacing of the font to 1 or lower the size is calculated correctly and Container(9).HasNext returns false until the amount of text exceeds the max height of 800.
Reply

Logout Mark Read Team Forum Stats Members Help
TextBox auto height incorrectly calculated0