BBjGrid::setSelectionForeground

Description

In BBj 19.00 and higher, this method sets the foreground BBjColor value of a selection in a BBjGrid.

Syntax

Return Value

Method

void

setSelectionForeground(BBjColor color)

Parameters

Variable

Description

color

Foreground color of selections in the grid.

Return Value

None.

Remarks

The int values in the BBjVector can be (R,G,B) or (R,G,B,a).

Example

gui! = BBjAPI().openSysGui("X0")
wnd! = gui!.addWindow(gui!.getAvailableContext(),100,50,500,400,"Grid Test")
grd! = wnd!.addGrid(wnd!.getAvailableControlID(),32,24,252,133)
grd!.setEnhancedSelectionModelEnabled(1)
grd!.setNumColumns(2)
grd!.setRowHeight(30)
grd!.setFitToGrid(BBjGrid.AUTO_RESIZE_NEXT_COLUMN)
vec! = new BBjVector()
vec!.addItem("1")
vec!.addItem("Item 1")
vec!.addItem("2")
vec!.addItem("Item 2")
vec!.addItem("3")
vec!.addItem("Item 3")
grd!.setNumRows(3)
grd!.setCellText(vec!)
red! = gui!.makeColor(gui!.RED)
RGB! = gui!.makeColor(215,255,100)
grd!.setSelectionBackground(RGB!)
grd!.setSelectionForeground(red!)
print grd!.getSelectionBackground()
print grd!.getSelectionForeground()
wnd!.setCallback(wnd!.ON_CLOSE,"close")
process_events

close:
release

See Also

BBjAPI

BBjColor

BBjGrid::getSelectionBackground

BBjGrid::getSelectionForeground

BBjGrid::setSelectionBackground

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