BBjTabCtrl::getTabPlacement

Description

Returns the placement of the tabs in the BBjTabCtrl.

Syntax

Return Value

Method

int

getTabPlacement()

Parameters

None.

Return Value

Returns one of the following constants which is the placement of the tabs:

TOP

BOTTOM

LEFT

RIGHT

Remarks

The default tab placement is TOP.

Example

rem 'Get the placement of the tabs in a tab control

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 'Set the tabs to be multi-lined
myTabCtrl!.setMultiLine(mySysGui!.TRUE)

rem 'Set tab placement to RIGHT
myTabCtrl!.setTabPlacement(mySysGui!.RIGHT)

PARENT_CONTEXT = mySysGui!.getContext()

NUM_OF_TABS = 4
FOR I = 1 TO NUM_OF_TABS

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

    rem 'Add a static text control on the child window
    CHILD_TEXT$ = "Child Window " + STR(I)
    let myStaticText! = myChildWindow!.addStaticText(300+I,X,Y,WIDTH,HEIGHT,CHILD_TEXT$)

    rem 'Add the child window as a tab on the tab control
    TAB_TEXT$ = "Tab " + STR(I)
    myTabCtrl!.addTab(TAB_TEXT$,myChildWindow!)
NEXT I

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

rem 'Get the placement of the tabs in a tab control, this will return
rem 'the constant RIGHT
TAB_LOC = myTabCtrl!.getTabPlacement()

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.