Skip to main content
Version: 20 R7 BETA

GET STYLE SHEET INFO

GET STYLE SHEET INFO ( styleSheetName ; font ; size ; styles )

ParameterTypeDescription
styleSheetNameTextName of style sheet
fontTextCharacter font
sizeIntegerFont size
stylesIntegerStyle value

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

Description

The GET STYLE SHEET INFO command returns the current configuration of the style sheet designated in the styleSheetName parameter.

In styleSheetName, you pass the name of the style sheet as defined in the Design mode. To designate an automatic style sheet, you can use one of the following constants, found in the "Font Styles" theme:

ConstantTypeValueComment
Automatic style sheetString__automatic__Used by default for all objects
Automatic style sheet_additionalString__automatic_additional_text__Supported by static text, fields and variables only. Used for additional text in dialog boxes.
Automatic style sheet_mainString__automatic_main_text__Supported by static text, fields and variables only. Used for main text in dialog boxes.

In font, the command returns the name of the font associated with the style sheet for the current platform.

In size, the command returns the size in points of the font associated with the style sheet for the current platform.

In styles, the command returns a value corresponding to the style(s) associated with the style sheet for the current platform. You can compare the value received with the following constants, found in the "Font Styles" theme:

ConstantTypeValue
BoldLongint1
Bold and ItalicLongint3
Bold and UnderlineLongint5
ItalicLongint2
Italic and UnderlineLongint6
PlainLongint0
UnderlineLongint4

If the command is executed correctly, the OK system variable is set to 1. Otherwise (for example, if the styleSheetName does not exist), it is set to 0.

Compatibility Note

In project architecture, only the three automatic style sheets are supported by this command.

Example

You want to find out the current configuration of the "Automatic" style sheet:

 var $size;$style : Integer
 var $font : Text
 GET STYLE SHEET INFO(Automatic style sheet;$font;$size;$style)

See also

LIST OF STYLE SHEETS
OBJECT SET STYLE SHEET