QGrid
![]() |
![]() |
QG_SetNumCells(areaRef; sizeExpression):errorCode | |||
![]() |
areaRef | Longint | QGrid area reference |
![]() |
sizeExpression | Text | Expression giving the number of grid cells |
![]() |
error | Longint | Error result |
Sets the 4D expression to use for calculating the grid size.
QGrid uses this expression to calculate how many cells the grid will contain, so the expression must return a long integer value. You should inform the plug-in when it is time to recalculate the number of cells by calling QG_UpdateArea with the update type set to qg_Update_Grid.
Parameter areaRef is the QGrid area reference. If areaRef is not a valid QGrid area reference, qg_paramErr error is returned.
Parameter sizeExpression holds the 4D expression to be used in calculating the number of cells.
Example
` setting a grid to reflect the current selection of table [Photos] C_TEXT($xpression) $xpression:="Records in selection([Photos])" $err:=QG_SetNumCells (xGrid;$xpression) If ($err # qg_noErr) ` Handle the error End if |
Related commands
QG_GetNumCells | Returns the current grid size expression |
QG_UpdateArea | Triggers an update of the area contents |