From Xojo Documentation

(Redirected from GroupBox.FontUnits)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!


Used by many RectControl classes to set the TextUnits property. This is the unit in which the font size is specified for the control.


The FontUnits enum has the following values:

Value Constant Description
0 Default An appropriate cross-platform selection. On Macintosh, font units is in points, on Windows it is in pixel size, and on Linux it is a scale Point size. This is a legacy carry-over from the days where the TextSize of 12 was the default and 12 was assumed to be the standard font size on each platform.
1 Pixel Units are pixels.
2 Point Units are points.
3 Inches Units are inches.
4 Millimeter Units are millimeters.

This feature works on Windows, Mac, and Linux.

Sample Code

Setting the units to pixels for a TextArea control:

Me.TextUnit = FontUnits.Pixel

See Also

DesktopBevelButton, DesktopCheckBox, DesktopComboBox, Graphics, DesktopGroupBox, DesktopLabel, DesktopListBox, DesktopPopupMenu, DesktopButton, DesktopRadioButton, StringShape, DesktopTabPanel, DesktopTextArea, DesktopTextField controls