BBjGridData::remove

Description

In BBj 18.0 and higher, this method removes a user specified BBjGridCell.

Syntax

Return Value

Method

boolean

remove(int p_row, int p_col)

Parameters

None.

Return Value

Removes the BBjGridCell in the container class BBjGridData specified by the user if it exists. Returns true if the cell was removed, returns false if the BBjGridCell does not exist or if it was removed already.

Remarks

None.

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)
print "Get (1,1): ", data!.get(1,1)
print "Remove (0,0): ", data!.remove(0,0)
print "Remove (1,1): ", data!.remove(1,1)
print "Get (1,1): ", data!.get(1,1)
process_events

APP_CLOSE:
release

See Also

BBjAPI

BBjGrid

BBjGridCell

BBjGridData

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