BBjGrid::setEnterAsTab

Description

In BBj 11.0 and higher, this method sets whether an ENTER key that is pressed while focus is on the grid will be interpreted as though a TAB key had been pressed.

Syntax

Return Value

Method

void

setEnterAsTab(boolean enterAsTab)

Parameters

Variable

Description

Variable

Description

enterAsTab

Specifies whether the ENTER key should be interpreted as a TAB key:

0=

The ENTER key is not interpreted as a TAB key.

1=

The ENTER key will be interpreted as a TAB key. The effect of pressing ENTER will be determined by the value set by the most recent call to BBjGrid::setTabAction.

Return Value

None.

Remarks

By default, pressing ENTER when the selected cell is an editable cell will toggle editing on that cell. When enterAsTab is TRUE the user can no longer start editing by pressing ENTER.

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

Example

rem ' BBjGrid::setEnterAsTab Example

rem ' setEnterAsTab.bbj
sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(50,50,450,620,"",$00090083$,$$)
window!.setCallback(window!.ON_CLOSE, "eoj")
rows=20,cols=2,flags$=$0068$
grid! = window!.addGrid(1234,10,60,380,170,flags$,rows,cols)
print "isEnterAsTab: ", grid!.isEnterAsTab()
grid!.setEditable(1)
grid!.setTabAction(grid!. GRID_NAVIGATE_GRID)
grid!.setEnterAsTab(1)
print "isEnterAsTab: ", grid!.isEnterAsTab()
grid!.startEdit(0,0)
process_events
process_events

eoj:
release

See Also

BBjAPI

BBjGrid

BBjWindow

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