BBjWindow::setEnterAsTab

Description

In BBj 11.00 and higher, this method sets whether the ENTER key navigates between controls like the TAB key.

Syntax

Return Value

Method

void

setEnterAsTab(boolean enterAsTab)

Parameters

Variable

Description

enterAsTab

Specifies whether the ENTER key navigates between controls:

 

0=

Only the TAB key navigates between controls. This is the default.

 

1=

Either the TAB key or the ENTER key may be used to navigate between controls. When this mode is set, the ENTER key no longer activates the button with ID=1.

Return Value

None.

Remarks

By default, only the TAB key navigates between controls.

This is BBjWindow method; do not confuse it with BBjGrid::setEnterAsTab.

Example

rem ' EnterAsTab

sysgui = unt
grid=107,rows=9,cols=3
open (sysgui)"X0"
print (sysgui)'scale'(1.5,1.5)
list$="a"+$0a$+"b"+$0a$+"c"+$0a$+"d"+$0a$+"e"+$0a$
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(100,100,200,425,"EnterAsTab",$00810003$,$$)
window!.setCallback(window!.ON_CLOSE,"eoj")
edit! = window!.addEditBox(101,10,10,180,30,"edit",$$)
window!.addEditBox(102,10,50,180,30,"edit",$$)
window!.addListButton(103,10,90,90,90,"listbutton"+$0a$+list$,$$)
window!.addListEdit(104,110,90,80,90,"listedit"+$0a$+list$,$$)
window!.addEditBox(105,10,130,80,30,"edit",$$)
window!.addInputE(106,110,130,80,30,$0006$,255,$$,"inpute")
grid! = window!.addGrid(grid,10,170,180,180,$814a$,rows,cols)
grid!.setTabAction(grid!.GRID_NAVIGATE_GRID)
nada$ = sendmsg(sysgui,grid,29,cols,$$)
nada$ = sendmsg(sysgui,grid,108,1,$$)
nada$ = sendmsg(sysgui,grid,68,25,$$)
window!.addButton(1,10,360,80,25,"OK",$$)
window!.addButton(2,110,360,80,30,"Cancel",$$)
flags$ = iff(window!.isEnterAsTab(),$0004$,$0000$)
check! = window!.addCheckBox(3,10,390,180,25,"Enter As Tab",flags$)
check!.setCallback(check!.ON_CHECK_ON,"enterastab")
check!.setCallback(check!.ON_CHECK_OFF,"enterastab")
edit!.focus()
process_events

eoj:
release

enterastab:
    window!.setEnterAsTab(check!.isSelected())
return

See Also

BBjAPI

BBjWindow

Object Variables

SCRIBBLE Mnemonic

Window Navigation - SENDMSG() Function 1

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