Set Default Text Color - GRID SENDMSG() Function 56

Syntax

NULL$=SENDMSG(sysgui,id,56,0,rgb${,context{,ERR=lineref}})

Description

This function sets the default text color for the grid.

Parameter

Description

sysgui

SYSGUI channel.

id

Grid control ID.

56

Number of this SENDMSG() function.

0

Always zero.

rgb$

An $RRGGBB$-formatted string that defines the RGB value of the text color. The default color can be overridden in individual cells in a standard grid with Draw Cell - Grid SENDMSG() - Function 54.

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 text color for each column can be changed by using the TCOLOR attribute with SENDMSG() Function 80.

The return value is a null string.

Example

The following example displays a grid with green text:

sysgui=unt; open (sysgui)"X0"
print (sysgui)'window'(50,50,200,150,"Grid Sample",$$,$$)
print (sysgui)'grid'(100,20,20,160,120,$9040$,3,3,3)
result$=sendmsg(sysgui,100,56,0,$00ff00$); rem set text to green
result$=sendmsg(sysgui,100,68,150/4,$$); rem row height
for col=0 to 2
result$=sendmsg(sysgui,100,36,col,chr(51)); rem column width
next col
result$=sendmsg(sysgui,100,57,0,$$)
for row=0 to 2
tf$=sendmsg(sysgui,100,48,row,$$)
for col=0 to 2
let tf$=sendmsg(sysgui,100,22,col,str(col))
next col
next row
escape

See Also

BBjStandardGrid::setCellForeColor