Highlighted
Absent Member.
Absent Member.
261 views

[archive] Grid setting Entry mode by coding

[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
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Grid setting Entry mode by coding

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.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Grid setting Entry mode by coding

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.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.