Skip to main content

[Migrated content. Thread originally posted on 14 February 2006]

Hello,

- There is some way in coding or in screen design to set the grid in entry mode when the event goto-cell or goto-cell-mouse occurs?

and another question

- When I hit the enter key in the last cell of the grid (msg-finish-entry), how i can move the focus out of the grid?

Thanks very much in advance

[Migrated content. Thread originally posted on 14 February 2006]

Hello,

- There is some way in coding or in screen design to set the grid in entry mode when the event goto-cell or goto-cell-mouse occurs?

and another question

- When I hit the enter key in the last cell of the grid (msg-finish-entry), how i can move the focus out of the grid?

Thanks very much in advance
I have no answer for the first question, but for the second one, there is an easy way to do it:

Screen1-Gd-1-Ev-Msg-Finish-Entry.

set event-action to event-action-terminate

.

Screen1-Gd-1-Ex-Other.
if event-type = msg-Finish-entry
move X to control-id
move 4 to accept-control
end-if
.

On the sample I do it for every cell, but you can check the cursor-x cursor-y values to know where you are and do the set event-action only on the cell you want too. (X is the value of the id of the control you want to go to).

Screen1-Gd-1-Ex-Other is the Other Exception for a grid, pretty handy sometimes.

I hope this helps.

[Migrated content. Thread originally posted on 14 February 2006]

Hello,

- There is some way in coding or in screen design to set the grid in entry mode when the event goto-cell or goto-cell-mouse occurs?

and another question

- When I hit the enter key in the last cell of the grid (msg-finish-entry), how i can move the focus out of the grid?

Thanks very much in advance
You could use the "w$keybuf" routine to set the grid to entry mode.

In your grid's event procedure for msg-goto-cell or msg-goto-cell-mouse, add

call "w$keybuf" using 1, "{KI}"

This will add the insert-key to the key buffer.

[Migrated content. Thread originally posted on 14 February 2006]

Hello,

- There is some way in coding or in screen design to set the grid in entry mode when the event goto-cell or goto-cell-mouse occurs?

and another question

- When I hit the enter key in the last cell of the grid (msg-finish-entry), how i can move the focus out of the grid?

Thanks very much in advance
You could use the "w$keybuf" routine to set the grid to entry mode.

In your grid's event procedure for msg-goto-cell or msg-goto-cell-mouse, add

call "w$keybuf" using 1, "{KI}"

This will add the insert-key to the key buffer.

[Migrated content. Thread originally posted on 14 February 2006]

Hello,

- There is some way in coding or in screen design to set the grid in entry mode when the event goto-cell or goto-cell-mouse occurs?

and another question

- When I hit the enter key in the last cell of the grid (msg-finish-entry), how i can move the focus out of the grid?

Thanks very much in advance
You could use the "w$keybuf" routine to set the grid to entry mode.

In your grid's event procedure for msg-goto-cell or msg-goto-cell-mouse, add

call "w$keybuf" using 1, "{KI}"

This will add the insert-key to the key buffer.