4D v14.3

GET STYLE SHEET INFO

Home

 
4D v14.3
GET STYLE SHEET INFO

GET STYLE SHEET INFO 


 

GET STYLE SHEET INFO ( styleSheetName ; font ; size ; styles ) 
Parameter Type   Description
styleSheetName  Text in Name of style sheet
font  Text in Character font
size  Longint in Font size
styles  Longint in Style value

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 "Automatic" style sheets, you can use the Automatic style sheet constant, available in the "Font Styles" theme: 

Constant Type Value
Automatic style sheet String __automatic__

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: 

Constant Type Value
Bold Longint 1
Bold and Italic Longint 3
Bold and Underline Longint 5
Italic Longint 2
Italic and Underline Longint 6
Plain Longint 0
Underline Longint 4

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.

Example  

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

 C_LONGINT($size;$style)
 C_TEXT($font)
 GET STYLE SHEET INFO(Automatic style sheet;$font;$size;$style)

 
PROPERTIES 

Product: 4D
Theme: Objects (Forms)
Number: 1256

The OK variable is changed by the command

 
HISTORY 

New
Created: 4D v14

 
SEE ALSO 

LIST OF STYLE SHEETS
OBJECT SET STYLE SHEET

 
ARTICLE USAGE

4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)