BBjStandardGrid::clearImage

Description

In BBj 19.0 and higher, this method removes images in grid cells in the BBjStandardGrid, leaving header images intact.

Syntax

Return Value

Method

void

clearImage()

void

clearImage(int p_row, int p_column)

Parameters

Variable

Description

p_row

Specifies the 0-based row of the grid cell whose image will be cleared.

p_column

Specifies the 0-based column of the grid cell whose image will be cleared.

Return Value

None.

Remarks

Not specifying a row or column will remove all images in the grid. Specifying a row and column will only remove the image from that grid cell.

Example

declare BBjSysGui sysgui!
declare BBjWindow win!
declare BBjStandardGrid grid!

sysgui!=BBjAPI().openSysGui("X0")
win!=sysgui!.addWindow(0,0,640,480,"Grid Testing Program")
grid!=win!.addGrid(101,0,0,640,400,$8040$,10,10)

grid!.setRowHeight(50)

imageManager! = sysGUI!.getImageManager()

rem 'Need to include two images for the demo to work
image! = imageManager!.loadImageFromFile("Smiley.jpg")
image2! = imageManager!.loadImageFromFile("foo.jpg")

images! = sysGUI!.makeVector()

images!.addItem(image!)
images!.addItem(image2!)

grid!.setCellImage(0,0,image!)
grid!.setCellImage(0,1,image2!)
grid!.setCellImage(0,2,image!)

grid!.clearImage(0,0)

process_events

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

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