BBjTabCtrl::setControlIDAt

Description

Sets the control to be used with a tab in the BBjTabCtrl to the control with the specified ID.

Syntax

Return Value

Method

void

setControlIDAt(int index, int controlID)

Parameters

Variable

Description

index

Specifies the 0-based index of the tab.

controlID

Specifies the ID of the control to be used with the specified tab.

Return Value

None.

Remarks

The tab and control must exist.

Example

rem 'Set a control for a tab in a tab control using control ID

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

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

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

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

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

rem 'Add a tab control to the window
let myTabCtrl! = myWindow!.addTabCtrl(101,50,50,200,200)

rem 'Create 1 tab on the tab control
myTabCtrl!.setNumTabs(1)

rem 'Create a child window
let myChildWindow! = myWindow!.addChildWindow(200,75,75,100,100,"",$$,1,$$)

rem 'Create a static text control
CHILD_TEXT$ = "Child Window"
let myStaticText! = myChildWindow!.addStaticText(300,X,Y,WIDTH,HEIGHT,CHILD_TEXT$)

rem 'Set a title for tab 1
myTabCtrl!.setTitleAt(0,"Tab 1")

rem 'Set a control for tab 1 in the tab control
myTabCtrl!.setControlIDAt(0,200)

rem 'Set the top level window visible
myWindow!.setVisible(1)

rem 'Register the CALLBACK routines
CALLBACK(ON_CLOSE,APP_CLOSE,0)

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

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