QGrid
![]() |
![]() ![]() |
QGObs_SetCaption(areaRef; tableNum; fieldNum; rectLeft; rectTop; rectRight; rectBottom; displayFormat):errorCode | |||
![]() |
areaRef | Longint | QGrid area reference |
![]() |
tableNum | Longint | Table number |
![]() |
fieldNum | Longint | Field number |
![]() |
rectLeft | Longint | Left coordinate |
![]() |
rectTop | Longint | Top coordinate |
![]() |
rectRight | Longint | Right coordinate |
![]() |
rectBottom | Longint | Bottom coordinate |
![]() |
displayFormat | String255 | Caption format description |
![]() |
error | Longint | Error result |
This QGrid v1.0 command is preserved in QGrid v1.1 for compatibility reasons.
It has been substituted by newer commands.
Sets up a caption object for area cells. Any previously defined caption object is deleted.
Parameter areaRef is the QGrid area reference. If areaRef is not a valid QGrid area reference, qg_paramErr error is returned.
Parameters tableNum and fieldNum specify the database field that will be the data source for the caption object. Acceptable field types are Alpha, Text, Real, Integer, Long Integer, Date, Time and Boolean. Passing an unsupported field type will result in qg_paramErr error.
Parameters rectLeft, rectTop, rectRight and rectBottom specify the caption box coordinates in the cell's coordinate system. Caption box coordinates can fall outside the cell bounds and even have negative values. In these cases only the visible part of the caption object's box is drawn on the cell. In case the values given do not specify a rectangle, error qg_InvalidRectErr is returned.
String parameter displayFormat specifies the text display format. It can have one of the following values:
Format string | Effective Date field format |
"1" | Short |
"2" | Abbreviated |
"3" | Long |
"4" | MM DD YYYY |
"5" | Month Date Year |
"6" | Abbr Month Date |
"7" | MM DD YYYY Forced |
Format string | Effective Time Field format |
"1" | HH MM SS |
"2" | HH MM |
"3" | Hour Min Sec |
"4" | Hour Min |
"5" | HH MM AM PM |
Example
` Set-up a caption object for area xGrid C_LONGINT($err;$tblNum;$fldNum;$left;$top;$right;$bottom) C_TEXT($format) $tblNum:=Table(->[Images]) $fldNum:=Field(->[Images]Caption) $left:=4 $top:=102 $right:=106 $bottom:=114 $format:="" $err:=QGObs_SetCaption ($area;$tblNum;$fldNum;$left;$top;$right;$bottom;$format) If ($err # qg_noErr) ` Handle the error End if |
Related commands
QG_SetCellCaption | Setup a caption object for the area cells |
QG_GetCellCaption | Return the current caption object |
QGObs_GetCaption | Returns the current caption object (obsolete) |