BBjSysGui::getAvailableContext

Description

Returns the next available context of the SysGui device.

Syntax

Return Value

Method

int

getAvailableContext()

Parameters

None.

Return Value

Returns the next available context ID.

Remarks

None.

Example

REM Get the next available context of the SysGui device

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 common addWindow param values
X=10
Y=10
WIDTH=200
HEIGHT=200
TITLE$="BBjWindow Example"

REM Get the next availabe context
CONTEXT=NUM(mySysGui!.getAvailableContext())

REM Create a window with a title in the specified context
myWindow! = mySysGui!.addWindow(CONTEXT,X,Y,WIDTH,HEIGHT,TITLE$)

See Also

BBjAPI

BBjWindow

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