Get Grid Information Block - GRID SENDMSG() Function 20
Syntax
GRID_INFO$=SENDMSG(sysgui,id,20,0,$${,context{,ERR=lineref}})
Description
For BBj-specific documentation, seeGet Grid Information Block - GRID SENDMSG() Function 20 BBj.
The grid information block is a templated string used by Draw Cell - Grid SENDMSG() Function 54 to set text, colors, alignment, and style in a cell. This function returns the default values in this string. Using this function with SENDMSG() Function 54 is a simple way to set default colors, style, and alignment in a main grid or a row or column heading grid. Default settings can be modified with other SENDMSG() functions. Any change in default settings will be reflected in the string returned by this function.
Parameter |
Description |
sysgui |
SYSGUI channel. |
id |
Grid control ID. |
20 |
Number of this SENDMSG() function. |
0 |
Always zero. |
$$ |
Always null. |
Use the TMPL() function with an index of 1 to retrieve the template for the grid information block. For example:
dim grid_info$:TMPL(sysgui,ind=1)
The full template follows:
msg:u(4),wparm:u(4),lparm:i(4),col:u(4),row:u(4),textcolor:c(3),backcolor:c(3),
alignment:u(1),style:i(4),imgidx:i(4),x:i(2),y:i(2),
w:u(2),h:u(2),ptx:I(2),pty:i(2),buf:c(1*)
Many of the fields in this template relate to individual cells or do not have meaningful defaults. The fields in the grid information block that are relevant to this function are described below:
Grid Information Block Field |
Description |
TEXTCOLOR |
RGB color string for text. |
BACKCOLOR |
RGB color string for background. The default value is |
ALIGNMENT |
Controls the alignment of text in the cell: |
STYLE |
Controls the appearance of the cell:. |
The table below shows the default values returned for main grid controls, assuming no defaults have been changed:
Grid Information Block Field |
Default Value |
TEXTCOLOR |
$000000$ (Black) |
BACKCOLOR |
$FFFFFF$ (White) |
ALIGNMENT |
2 (Centered) |
STYLE |
0 (INPUTE control) |
The table below shows the default values returned for heading grid controls, assuming no defaults have been changed:
Grid Information Block Field |
Default Value |
TEXTCOLOR |
$000000$ (Black) |
BACKCOLOR |
$C0C0C0$ (Gray) |
ALIGNMENT |
2 (Centered) |
STYLE |
1 (Raised button) |
The default text color can be changed with Set Default Text Color - Grid SENDMSG() Function 56. The default background color can be changed with Set Default Background Color - Grid SENDMSG() Function 55. The default alignment can be changed with Set Default Alignment - Grid SENDMSG() Function 84. The default style can be changed with Set Default Style - Grid SENDMSG() Function 83.
Note
In Visual PRO/5 Rev. 2.0x, this function returned a snapshot of the grid information block rather than default values. The values returned in this snapshot were not reliable.
See Also: