BBjGridCell::setSelected

Description

In BBj 18.00 and higher, this method sets the selected value in the BBjGridCell.

Syntax

Return Value Method
void setSelected(boolean selected)

Parameters

Parameter Description
selected Boolean selected value for the BBjGridCell.

Return Value

None.

Remarks

True (1) sets cell value to selected.

False (0) deselects cell value.

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!)
cell! = grid!.makeCell(1,1)
cell!.setSelected(true)
grid!.setCell(cell!)
process_events

APP_CLOSE:
release

See Also

BBjAPI

BBjGrid

BBjGrid::getCellRange

BBjGrid::getColumnData

BBjGridCell

BBjGridData

BBjGridCell::isSelected

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