Interface TabTraversable::isTabTraversable


Description

In BBj 4.0 and higher, isTabTraversable returns a value indicating whether or not the user can navigate to the control using the tab key.

Syntax

Return Value

Method

boolean

isTabTraversable(void)

Parameters

None.

Return Value

0 – navigation will pass over the control

1 – navigation will stop at the control

Example

REM EXAMPLE FOR TabTraversable

api!=BBjAPI()
SYSGUI = UNT
open(SYSGUI)"X0"

REM Build some controls
sg!=api!.getSysGui()
win!=sg!.addWindow(101,200,200,500,500,"Bound Controls",$00010002$)
butt! = win!.addButton(201,20,20,80,30,"Button",$$)
lab! = win!.addStaticText(202,120,20,120,30,"NonFocusableText",$$)
butt! = win!.addButton(302,20,60,80,30,"Button",$$)
butt! = win!.addButton(303,20,100,80,30,"Button",$$)
box!  = win!.addRadioButton(304,120,60,80,30,"RadioButton",$$)


REM REGISTER CALLBACKS
CALLBACK(ON_BUTTON_PUSH,TOGGLE_TABTRAV,sg!.getContext(),201)
CALLBACK(ON_BUTTON_PUSH,TOGGLE_TABTRAV,sg!.getContext(),302)
CALLBACK(ON_BUTTON_PUSH,TOGGLE_TABTRAV,sg!.getContext(),303)
CALLBACK(ON_CHECK_ON,TOGGLE_TABTRAV,sg!.getContext(),304)
CALLBACK(ON_CHECK_OFF,TOGGLE_TABTRAV,sg!.getContext(),304)
CALLBACK(ON_CLOSE,APP_CLOSE,sg!.getContext())

PROCESS_EVENTS

TOGGLE_TABTRAV:
DIM EVENT$:TMPL(SYSGUI)
EVENT$=sg!.getLastEventString()

con! = sg!.getWindow(EVENT$.CONTEXT).getControl(Event$.ID)
if(con!.isTabTraversable()) 
      con!.setTabTraversable(0)
      con!.setText("nontab")
else
      con!.setTabTraversable(1)
      con!.setText("tab")
fi
return

APP_CLOSE:
release
return

See Also

BBjAPI

BBjSysGui

BBjControl

TabTraversable

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