BBjStandardGrid::clearText

Description

In BBj 19.00 and higher, this method removes display text from grid cells in the BBjStandardGrid, leaving headers intact.

Syntax

Return Value

Method

void

clearText()

clearText(int row, int column)

Parameters

Variable

Description

row

Specifies the 0-based row of the grid cell where related text will be cleared.

column

Specifies the 0-based column of the grid cell where related text will be cleared.

Return Value

None.

Remarks

Not specifying a row or column will clear all display text in the grid, except in the column and row headers. Specifying a row and column will only clear the display text from that grid cell.

Example

BEGIN
bbj!=bbjapi()

SYSGUI=UNT
OPEN (SYSGUI)"X0"

gui!=bbj!.getSysGui()
mainWindow! = gui!.addWindow(100,100,202,160,TITLE$,$00010013$)

g! = mainWindow!.addGrid(100,3,26,198,121)
g!.setNumRows(2)
g!.setNumColumns(2)
mainWindow!.setVisible(gui!.TRUE)

g!.setCellData(0,0,"test","hello")
g!.setCellRestore(0,0,"Dolly Ding Dong")

g!.setCellData(0,1,"Bob","Goodbye")
g!.setCellRestore(0,1,"Dodo Bird")

g!.setCellData(1,1,"Sasha","Shalom")
g!.setCellRestore(1,1,"Raptor")

g!.clearText()

print "RESULTS!"
print "cell 0,0 text: "+g!.getCell(0,0).getText()
print "cell 0,0 related: "+g!.getCell(0,0).getRelated()
print "cell 0,0 restore: "+g!.getCell(0,0).getRestore()
print ""

print "cell 0,1 text: "+g!.getCell(0,1).getText()
print "cell 0,1 related: "+g!.getCell(0,1).getRelated()
print "cell 0,1 restore: "+g!.getCell(0,1).getRestore()

print ""
print "cell 1,1 text: "+g!.getCell(1,1).getText()
print "cell 1,1 related: "+g!.getCell(1,1).getRelated()
print "cell 1,1 restore: "+g!.getCell(1,1).getRestore()
print ""

escape

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

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