I have problem with INPUT-FIELD

Good Afternoon,

I am using an INPUT-FIELD for load an information and am adding a code in the METHOD “ENTER” to call the method CLICK of a BITMAP, which does not execute it seems that he executes when it loads again the Dialogue this is correct???

There exists a way of emulating EVENTS of keyboard.

In the INPUT-FIELD it allows me TAB but it does not capture or recognizes the ENTER, since I can do it?.

I am grateful for your commentaries and equally to moderators .

Maybe I don’t understand your problem correctly. But it seems to me, that you misunderstand the event ENTER. The event ENTER of an INPUT-field occurs, if you place the cursor in it. It doesn’t occur when you type something inside the field. This is covered by the event CHANGE.

Please try out the following for a quick test:

  1. Create a new dialog
  2. place two input-fields on it (and leave their names as they are)
  3. place a text constant on it (the default name should be #TC-1)
  4. then type the following code into every EVENT of the second input field (named #IF-2)
compress *EVENT "occurred on #IF-2" into #TC-1.string

Then click on the fields, enter something into it, jump with TAB between the fields and see, when the event ENTER occurs.

Thank you very much,

There can give me a siteor manual of reference NATURAL WINDOWS with ActiveX :?:

The Natural for Windows documentation contains a list of documents about event driven programming techniques. Here you can find a chapter “Working with ActiveX Controls”.

http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat622win/pg/pg_pte-over_0820.htm

Hi,

I nomally put an invisible PushButton on the dialog with the Style set to “OK Button (O)”. In the Click-event i put at code like this:

process gui action get-focus with #focus
decide on first value of #focus
value #inputfield /* <- name of field to check
. /* <- action code goes here :wink:
.
.
none value ignore
end-decide

I use this for ENTER in InputField, SelectionBox, ListView etc.

A similar method can be used for the ESC with the PushButton Style “Cancel Button ©” or by using the Accelerator in the PushButton supporting a great number of key combinations.

I hope you find this useful :slight_smile:

Kind regards

Michael

Matthias,

Thank my friend this was the link that I needed

[quote="Michael S

A few years ago, I had a discussion with experienced typists about the GUI-Featuers coming with Natural “Lightstorm”. The conclusion was, that the programmers should make important dialogs controllable by pressing TAB and ENTER. It is much more faster to TAB end ENTER thru a screen than controlling the dialog by mouse. Switching from keyboard to mouse and back again is very time consuming.

So I think: Michael’s solution sounds good for that cases.