BBjGridCell::setBackColor

Description

In BBj 18.00 and higher, this method sets the background color in the BBjGridCell.

Syntax

Return Value Method
void setBackColor(BBjColor color)
void setBackColor(int red, int green, int blue)
void setBackColor(int red, int green, int blue, int a)

Parameters

Parameter Description
color BBjColor value
red Integer representation of color red (0-255).
green Integer representation of color green (0-255).
blue Integer representation of color blue (0-255).
a Integer representation of intensity (0-255).

Return Value

None.

Remarks

This function will automatically change the int values (R,G,B) and (R,G,B,a) to its BBjColor equivalents.

Example

sysgui! = bbjapi().openSysGui("X0")
window! = sysgui!.addWindow(10,10,520,300,"Grid Events",$00010082$)
window!.setCallback(window!.ON_CLOSE,"APP_CLOSE")
grid! = window!.addGrid(101,102,103,10,10,500,200,$000e$)
grid!.setRowHeight(20)
cols=30,rows=10
grid!.setNumColumns(cols)
grid!.setNumRows(rows)
grid!.setDefaultColumnWidth(50)
grid!.setUserResizable(1)
cells! = bbjapi().makeVector()
for row=0 to rows-1
    for col=0 to cols-1
        cells!.addItem("C"+STR(col)+" R"+STR(row))
    next col
next row
grid!.setCellText(cells!)
data! = grid!.getRowData(1)
cell! = data!.first()
cell!.setBackColor(100,200,175)
print cell!.getBackColor()
grid!.setCell(cell!)
process_events

APP_CLOSE:
release

See Also

BBjAPI

BBjGrid

BBjGrid::getColumnData

BBjGrid::getCellRange

BBjGrid::getRowData

BBjGridData

BBjGridCell::getBackColor

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.