
BBjTabCtrl::setToolTipTextAt
Description
In BBj 14.0 and higher, this method sets the tooltip text for a tab in the BBjTabCtrl.
Syntax
Return Value |
Method |
void |
setToolTipTextAt(int index, string toolTipText) |
Parameters
Variable |
Description |
index |
Specifies the 0-based index of the tab. |
toolTipText |
Specifies the tool tip text to be set on the tab. |
Return Value
None.
Remarks
None.
Example
REM Get the tooltip text of a tab 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)
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 myTabCtrl!.addTab("Tab "+STR(I),myChildWindow!) myTabCtrl!.setToolTipTextAt(i-1,"tooltip "+STR(I)) NEXT I
REM Set the top level window visible myWindow!.setVisible(1)
REM Get the tool tip text of tab 2 in the tab control; this will return "tooltip 2" TOOLTIP$ = myTabCtrl!.getToolTipTextAt(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 RETURN |
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.