BBjGridCell

Description

In BBj 18.00 and higher, this object collects a snapshot of data from a particular cell within a BBjGrid.

Note: Due to certain limitations and exceptions, some function calls are not available in BUI.

Creation

BBjAPI > BBjSysGui > BBjWindow > BBjGrid > BBjGridCell

The BBjGridCell object is created through the BBjGrid:

Return Value

Method

BBjGridCell

getCell(int row, int column)

BBjGridCell

getSelectedCell()

BBjGridCell

makeCell(int row, int column)

Methods of BBjGridCell

Return Value

Method

BBjColor

getBackColor()

BBjVector

getChangedData()

int

getColumn()

BBjFont

getFont()

BBjColor

getForeColor()

int getImageLocation()

int

getListSelection()

String

getMask()

String

getRelated()

String

getRestore()

int

getRow()

boolean

getState()

int

getStyle()

String

getText()

String

getToolTip()

boolean

isEditable()

boolean

isSelected()

void

setBackColor(BBjColor color)

void

setBackColor(int red, int green, int blue)

void

setBackColor(int red, int green, int blue, int a)

void

setData(String cellText, String cellRelated)

void

setFont(BBjFont font)

void

setForeColor(BBjColor color)

void

setForeColor(int red, int green, int blue)

void

setForeColor(int red, int green, int blue, int a)

void setImageLocation(int location)

void

setListSelection(int listSelection)

void

setMask(String cellMask)

void

setRelated(String related)

void

setRestore(String restore)

void

setSelected(boolean selected)

void

setState(boolean state)

void

setStyle(int style)

void

setText(String cellText)

void

setToolTip(String text)

Constants

Value Constant

0

ROW

1

COLUMN

2

TEXT

3

MASK

4

STYLE

5

FOREGROUND_COLOR

6

BACKGROUND_COLOR

7

IS_EDITABLE

8

IS_SELECTED

9

RESTORE

10

RELATED

11

STATE

12

LIST_SELECTION

13 IMAGE_LOCATION
14 FONT
15 HEIGHT (not currently used)
16 WIDTH (not currently used)
17 TOOLTIP

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!.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!)

rem 'SelectedCell calls are here.

cellvec! = new BBjVector()
cell1! = grd!.makeCell(0,0)
cell2! = grd!.makeCell(1,1)
cell3! = grd!.makeCell(2,0)
cellvec!.add(cell1!)
cellvec!.add(cell2!)
cellvec!.add(cell3!)

grd!.setSelectedCells(cellVec!)
print grd!.getSelectedCells()

wnd!.setCallback(wnd!.ON_CLOSE,"close")

process_events

close:
release

See Also

BBjAPI

BBjGrid

BBjGridData

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