Set Default Style - GRID SENDMSG() Function 83
Syntax
NULL$=SENDMSG(sysgui,id,83,style,$${,context{,ERR=lineref}})
Description
For BBj-specific documentation, see Set Default Style - GRID SENDMSG() Function 83 BBj.
This function sets the default cell style for a grid.
Parameter |
Description |
sysgui |
SYSGUI channel. |
id |
Grid control ID. |
83 |
Number of this SENDMSG() function. |
style |
Default cell style. |
$$ |
Always null. |
The return value is a null string.
This function produces unpredictable behavior in a grid that has been made data-aware and should be used before binding the grid to a data channel with Set Channel and Template - SENDMSG() Function 80.The style for each column can be changed by using the STYLE attribute with SENDMSG() Function 80.
Example
The following example shows how to use SENDMSG() Function 83 to set a default cell style of 2 (recessed button). This style is overridden on the TITLE field by setting the STYLE user attribute to 0 in the grid template DATAREC_DESC$:
sysgui=unt; open (sysgui)"X0"
print (sysgui)'window'(0,20,390,120,"",$00000082$,$ff$)
print (sysgui)'grid'(100,20,20,360,84,$8842$,3,3,5,15,101)
result$=sendmsg(sysgui,100,68,12,$$)
datarec_desc$="cdnumber:c(6*=10):SHOW=1 LABEL=Number:,"+
: "title:c(50*=10):SHOW=1 LENGTH=50 LABEL=Title STYLE=0:"
dim datarec$:datarec_desc$
sel_chan=unt; select (sel_chan)datarec$ from "datagrid.dat"
tf$=sendmsg(sysgui,100,83,2,$$)
tf$=sendmsg(sysgui,100,80,sel_chan,datarec_desc$)
escape