Using arrow keys as input...
Posted in 1994
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL, Triggers, Constraints & Referential Integrity
Ok, here's what I would like to do: I am trying to make a nice interface for the users when they are selecting a certain date out of several. Basically, I would like to open a window that displays 3 of the dates (in chronological order) with the center one highlighted. If the user doesn't want the one which is highlighted, he/she can simply press the arrow keys on their keyboard, and the dates will scroll up and down in the window, until the date that is desired is in the highlighted area. Then the user presses <ENTER>, and the highlighted date is chosen. What I have done: So far, I have done all the easy stuff such as opening a cursor for the dates, presenting them in the window nice and fine, all of that kind of stuff. What I can't figure out how to do, is to have the user press on the arrow keys, and have that trigger some code to act. I would like something like the INPUT...ON KEY idea, but I would prefer not to use a screen form. I would like to detect that the user hit the arrow key, and then scroll through the dates (via the cursor) corresponding to which arrow key was hit. What I am doing this with: Informix 4gl, 5.0 Engine, 4.1 Tools. Any suggestions??? Please either post them, or email me: jcfowler@david.wheaton.edu Thanks for any help you can give. john...