Skip to main content
Version: 20 R7 BETA

OBJECT SET FONT SIZE

OBJECT SET FONT SIZE ( {* ;} object ; size )

ParameterTypeDescription
*OperatorIf specified, Object is an Object Name (String) If omitted, Object is a Field or a Variable
objectanyObject Name (if * is specified), or Field or Variable (if * is omitted)
sizeIntegerFont size in points

This command is not thread-safe, it cannot be used in preemptive code.

Description

OBJECT SET FONT SIZE sets the form objects specified by object to be displayed using the font size you pass in size.

If you specify the optional * parameter, you indicate an object name (a string) in object. If you omit the optional * parameter, you indicate a field or a variable in object. In this case, you specify a field or variable reference (field or variable objects only) instead of a string. For more information about object names, see the Object Properties section.

The size is any integer between 1 and 255. If the exact font size does not exist, characters are scaled.

The area for the object, as defined in the form, must be large enough to display the data in the new size. Otherwise, the text may be truncated or not displayed at all.

Note: If you use this command on an object that was using a style sheet, the reference to the style sheet is automatically deleted from the object -- even if you assign the same attributes as those of the style sheet.

Example 1

The following example sets the font size for a variable named vtInfo:

 OBJECT SET FONT SIZE(vtInfo;14)

Example 2

The following example sets the font size for all the form objects whose name starts with "hl":

 OBJECT SET FONT SIZE(*;"hl@";14)

See also

OBJECT Get font size
OBJECT SET FONT
OBJECT SET FONT STYLE
Programming Notes