![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm making a menu program with Informix 4GL 7.32.UC4. *I'm loading all the menu items into an array and then using a 'display array' so the user can arrow through the items in the screen form. *I would also like the user to be able to jump to an item in the array by keying in the associated item number which is displayed in it's own field next the the item description. display array mv_arr to sa_menu.* attribute(current row display="reverse") * * on key(return) * * * # So we can jump to an item number, need to use variables the 1,1 was just for testing * * * # call fgl_setcurrline(1,1) * * * exit display end display let lv_ac = arr_curr() return lv_ac The menu works if the user arrows to the item and presses return, the calling function then knows what array item the user selected. *I'd like to somehow use fgl_setcurrline(), fgl_getkey(), fgl_lastkey(), fgl_keyval, but since the last key pressed will be "return" I don't see how I can get the item number the user keyed. *Also while in the 'display array' if any number keys are pressed it beeps so I don't think 4GL keeps track of those keys. *Is there anyway to do this? |
#3
| |||
| |||
|
|
On Sep 29, 11:32*am, loc <c320... (AT) gmail (DOT) com> wrote: I'm making a menu program with Informix 4GL 7.32.UC4. *I'm loading all the menu items into an array and then using a 'display array' so the user can arrow through the items in the screen form. *I would also like the user to be able to jump to an item in the array by keying in the associated item number which is displayed in it's own field next the the item description. display array mv_arr to sa_menu.* attribute(current row display="reverse") * * on key(return) * * * # So we can jump to an item number, need to use variables the 1,1 was just for testing * * * # call fgl_setcurrline(1,1) * * * exit display end display let lv_ac = arr_curr() return lv_ac The menu works if the user arrows to the item and presses return, the calling function then knows what array item the user selected. *I'd like to somehow use fgl_setcurrline(), fgl_getkey(), fgl_lastkey(), fgl_keyval, but since the last key pressed will be "return" I don't see how I can get the item number the user keyed. *Also while in the 'display array' if any number keys are pressed it beeps so I don't think 4GL keeps track of those keys. *Is there anyway to do this? I assume what I was asking can't be done, my next question then is would a menu program like this typically have a single row for the array? Here is what my screen form looks like: database formonly screen { Menu Screen [a1][a2 ] [a1][a2 ] [a1][a2 ] [a1][a2 ] [a1][a2 ] [a1][a2 ] [a1][a2 ] [a1][a2 ] [a1][a2 ] [a1][a2 ] [a1][a2 ] [a1][a2 ] [a1][a2 ] [a1][a2 ] [a1][a2 ] [a1][a2 ] [a1][a2 ] [a1][a2 ] [a1][a2 ] [a1][a2 ] [a1][a2 ] [a1][a2 ] |
![]() |
| Thread Tools | |
| Display Modes | |
| |