Interface Focusable::isFocusable

Description

In BBj 6.00 and higher, isFocusable returns a value indicating whether or not the user can focus the control.

Note:

A focused control is the control to which keyboard interaction is directed. Typically, the focused control is indicated visually, often via a dotted grey border. A control which is not focusable, therefore, cannot be manipulated via the keyboard. It is still possible to interact with a non-focusable control via the mouse. To disable all interaction, including the mouse, see setEnabled() and setEditable().

Syntax

Return Value Method
boolean isFocusable()

Parameters

None.

Return Value

Returns true (1) if the control is focusable.

Returns false (0) if the control is not focusable.

Example

LET myAPI!=BBjAPI()

SYSGUI=UNT
OPEN (SYSGUI) "X0"

LET mySysGui!=myAPI!.getSysGui()

myWindow! = mySysGui!.addWindow(10,10,100,300,"Mouse Focusable Demo",$00010003$)
both1! = myWindow!.addEditBox(101,10,10,90,30,"Both Tab and Mouse",$0008$)
both2! = myWindow!.addEditBox(102,10,50,90,30,"Both Tab and Mouse",$0008$)

justMouse! = myWindow!.addEditBox(104,10,150,90,30,"Just Mouse",$0008$)
justMouse!.setTabTraversable(0)

justMouse! = myWindow!.addEditBox(105,10,200,90,30,"Neither",$$)
justMouse!.setFocusable(0)

neither! =  myWindow!.addButton(106,10,250,90,30,"Neither",$0000$)
neither!.setFocusable(0)

CALLBACK(ON_CLOSE,APP_CLOSE,mySysGui!.getContext())

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

TabTraversable

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