QGrid
![]() |
![]() |
QG_GetCaptionStyle(areaRef; fontName; fontSize; textFace; textJust; foreColor; backColor):errorCode | |||
![]() |
areaRef | Longint | QGrid area reference |
![]() |
fontName | String255 | Font name |
![]() |
fontSize | Longint | Font size |
![]() |
textFace | Longint | Text style |
![]() |
textJust | Longint | Text justification |
![]() |
foreColor | Longint | Text foregroung color |
![]() |
backColor | Longint | Text backgroung color |
![]() |
error | Longint | Error result |
Returns the current caption text appearance settings.
Parameter areaRef is the QGrid area reference. If areaRef is not a valid QGrid area reference, qg_paramErr error is returned.
The rest of the parameters receive the current caption text appearance settings. If no caption object is defined for the plug-in area, qg_NoCaptionErr error is returned.
Parameters font and fontSize receive the name and the size in points of the font respectively.
Parameter textFace receives the caption text style. It is a combination (by addition or bitwise "or") of the following 4D constants:
Constant | Value |
Plain | 0 |
Bold | 1 |
Italic | 2 |
Underline | 4 |
Outline | 8 |
Shadow | 16 |
Condensed | 32 |
Extended | 64 |
Parameter textJust receives the text justification. It is one of the following QGrid constants:
qg_JustLeft | 1 | Left justified |
qg_JustCenter | 0 | Centered |
qg_JustRight | 2 | Right justified |
Parameters foreColor and backColor receive the foreground and background caption text color. They are expressed in 4D's RGB color notation (0x00RRGGBB - see SET RGB COLORS in 4D's documentation). Parameter backColor can also have the reserved value qg_NoFillColor.
Example
C_LONGINT($err) C_TEXT($font) C_LONGINT($size;$face;$fJust;$fForeClr;$fBackClr) $err:=QG_GetCaptionStyle (xGrid;$font;$size;$face;$fJust;$fForeClr;$fBackClr) If ($err = qg_NoCaptionErr) ` No caption object was defined for the area Else If ($err # qg_noErr) ` Handle the error End if End if |
Related commands
QG_SetCellCaption | Setup a caption object for the area cells |
QG_SetCaptionStyle | Sets the caption text appearance |