Method XbpActiveXControl():setFont() Foundation

Set a new font.

Syntax
:setFont( [<oFont>] ) --> oCurrentFont
Parameters
<oFont>
<oFont> is an object of class XbpFont.
Return

The method returns the current XbpFont object set for displaying text. If a new font is passed in <oFont>, :setFont() returns the XbpFont object that had been set previously.

Description

The method :setFont() changes the font used by an ActiveX control for doing textual output. :setFont() assigns the font object passed in parameter <oFont> to the DISPID_FONT property of the ActiveX control. :setFont() returns the font previously set. If the control does not support changing the font, this method returns NIL.

Using :setFont() to set the font to be used by an ActiveX control implicitly overrides the corresponding setting of the control container's ambient property (DISPID_AMBIENT_FONT). See :inheritPresParams()for further information.

Not all ActiveX controls support changing the font via the DISPID_FONT property. Often, controls expose the properties of the font used for textual output via individual properties, such as :fontSize. Check the documentation that accompanied your ActiveX control to find out whether the control supports the DISPID_FONT property.

Feedback

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.