BBjGrid::getMaxVisibleColumns

Description

In BBj 19.00 and higher, this method returns the maximum number of columns that will fit inside the visible viewing area of the BBjGrid.

Syntax

Return Value

Method

int

getMaxVisibleColumns()

Parameters

None.

Return Value

Returns the maximum number of columns that will fit inside the visible viewing area of the grid, as an integer.

Remarks

This function, together with BBjGrid::getVisibleColumns, is a replacement for the deprecated function BBjGrid::getVisibleColumnCount.

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)

rem 'grd!.setEnhancedSelectionModelEnabled(1)
grd!.setNumColumns(2)
grd!.setRowHeight(30)
grd!.setEditable(1)
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!)
print grd!.getVisibleRows()
print grd!.getVisibleColumns()
print grd!.getMaxVisibleRows()
print grd!.getMaxVisibleColumns()
wnd!.setCallback(wnd!.ON_CLOSE,"close")
process_events

close:
release

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

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