BBjTabCtrl::isEnabledAt

Description

Returns whether a tab is enabled in the BBjTabCtrl.

Syntax

Return Value

Method

boolean

isEnabledAt(int index)

Parameters

Variable

Description

index

Specifies the 0-based index of tab.

Return Value

Returns whether the tab is enabled (0 = Not Enabled, 1 = Enabled).

Remarks

By default, the tabs are enabled.

Example

REM Determine if a tab in a tab control is enabled or not

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 a child window
LET myChildWindow!=myWindow!.addChildWindow(200,75,75,100,100,"",$$,1,$$)

REM Add a static text control on the child window
CHILD_TEXT$="Child Window"
LET myStaticText!=myChildWindow!.addStaticText(300,X,Y,WIDTH,HEIGHT,CHILD_TEXT$)

REM Insert a tab into the tab control using the child window object
myTabCtrl!.insertTab(0,"Tab 4",myChildWindow!)

REM Insert a tab into the tab control using the child window object's ID
myTabCtrl!.insertTab(0,"Tab 3",myChildWindow!.getID())

REM Set an image list for the tab control
myTabCtrl!.setImageListPath("tab.bmp")

REM Insert a tab into the tab control using an image from the image list and the child window object
myTabCtrl!.insertTab(0,"Tab 2",0,myChildWindow!)

REM Insert a tab into the tab control using an image from the image list and the child window object's ID
myTabCtrl!.insertTab(0,"Tab 1",1,myChildWindow!.getID())

REM Set tab 4 to be disabled
myTabCtrl!.setEnabledAt(3, mySysGui!.FALSE)

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

REM Determine if a tab in a tab control is enabled or not, this will
REM return 0, FALSE
TAB_ENABLED=myTabCtrl!.isEnabledAt(3)

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
RETURN

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

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