Method XbpWindow():setFont() Foundation

Sets or returns a font object used by Xbase Parts displaying characters.

:setFont( [<oXbpFont>] ) --> oXbpCurrentFont
<oXbpFont> is a font object that determines the font for all characters drawn in an Xbase Part derived from XbpWindow.

The :setFont() method returns the current font object. When a new font is set, this method returns the previously set font object.


The :setFont() method works on the basis of an XbpFont object rather than a font compound name used by the method :setFontCompoundName(). This allows for configuring an XbpFont object in detail and using it as the default font in an application window, for example.

The font used by XbpMenu and XbpMenuBar objects cannot be defined by an Xbase++ program. Instead, instances of these Xbase Part classes use a system font defined in Control Panel.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.