BBjGrid::suppressUpdatesWhileScrolling

Description

In BBj 5.00 and higher, this method suppresses update requests to the program while the user scrolls the BBjGrid.

Syntax

Return Value Method
void suppressUpdatesWhileScrolling(boolean suppress)

Parameters

Parameter Description
suppress Indication of whether to suppress updates during scrolling.

Return Value

None.

Example

rem 'suppress updates when scrolling in a BBjStandardGrid object

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

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

rem 'Obtain the instance of the BBjSysGui object
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$)

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

rem 'Set the grid properties
myGrid!.setDefaultColumnWidth(130)
myGrid!.setGridEditable(1)
myGrid!.setHorizontalScrollable(mySysGui!.TRUE)
myGrid!.setVerticalScrollable(mySysGui!.TRUE)

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

rem 'suppress updates while scrolling
myGrid!.suppressUpdatesWhileScrolling(1)

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

rem 'Process Events
process_events

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

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

Methods of BBjGrid – Grid Scrolling

BBjGrid::getScrollUpdate

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