BBjGrid::setShouldHighlightSelectedColumn

Description

In BBj 15.00 and higher, this method sets whether the grid will highlight the entire column containing the currently selected cell.

Syntax

Return Value

Method

void

setShouldHighlightSelectedColumn(int p_should)

Parameters

Variable

Description

p_should

Indicates whether the grid should highlight the entire column containing the currently selected cell.

Return Value

None.

Remarks

By default, a grid does not highlight the entire column of the currently selected cell. The default is false.

Example

rem 'Highlight the Selected Column

rem 'Obtain the instance of the BBjAPIobject
let myAPI!=BBjAPI()

rem 'Open the SysGui device
SYSGUI=UNT
OPEN (SYSGUI) "X0"

rem 'Obtain the instance of the BBjSysGuiobject
let mySysGui!=myAPI!.getSysGui()

rem 'Set addWindow param values
X=10
Y=10
WIDTH=400
HEIGHT=400
TITLE$="BBj Window"

rem 'Set the current context
mySysGui!.setContext(0)

rem 'Create a window
myWindow! = mySysGui!.addWindow(X,Y,WIDTH,HEIGHT,TITLE$,$000002$)

rem 'Add a grid on the window
myGrid! = myWindow!.addGrid(101,50,100,300,300,$8060$,4,2)

rem 'Set the grid properties
myGrid!.setDefaultColumnWidth(130)
myGrid!.setGridEditable(1)

rem 'Add text to the grid cells
FOR ROW = 0 TO 3
    FOR COL = 0 TO 1
        CELLTEXT$="row = " +STR(ROW+1) + ", col = " + STR(COL+1)
        myGrid!.setCellText(ROW,COL,CELLTEXT$)
    NEXT COL
NEXT ROW

rem 'set should highlight selected column
myGrid!.setShouldHighlightSelectedColumn(1)

rem 'check should highlight selected column
if myGrid!.getShouldHighlightSelectedColumn()=1then
    print "ShouldHighlightSelectedColumn()is active"
else
    print "ShouldHighlightSelectedColumn()is not active"
endif

rem 'Register the CALLBACK routines
CALLBACK(ON_CLOSE,APP_CLOSE,mySysGui!.getContext())

rem 'Process Events
process_events

rem 'Callback routine called when theuser closes the application window
APP_CLOSE:
release

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

BBjGrid::getShouldHighlightSelectedColumn

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