RE: Q: How do you highlight a specific row?
Posted in 1995
Ancil wrote: >I am poping up a window with a small form from which I want the user to pick >an >entry. How do you highlight (reverse) just the entry that the cursor is on so >that the user can easily tell what entry they are about to select. >I am using a display array to do this. >I have Online 5.04.UC2 >and I-4GL 4.13.UD1 Use BEFORE/AFTER ROW statements in the INPUT ARRAY so INPUT ARRAY ... BEFORE ROW DISPLAY ... TO ... ATTRIBUTE(REVERSE) AFTER ROW DISPLAY ... TO ... ATTRIBUTE(NORMAL) END INPUT You will need a dummy input field, which can be on the same screen as the display field, or on a second screen in the form (see multi screen forms for sperform, as below. Using this method, your first form overlays the second so the input field '[' is aligned beneath the ']' character of your last display field. Make all your_fields display only in the form. Idealy make the form delimiters spaces [makes display tidy]. screen 1 .... { [your_field1] [your_field2] [your_field1] [your_field3] } /\\ ..... | screen 2 | .... | { \\/ [a] [a] } ... Add the new column to your array definition and you are more or less ready to go. You need make [a] autonext and clear the field in a BEFORE FIELD statement. In an AFTER FIELD statement, check to see if the value is NOT NULL. If it is you return the cursor to the current field [the user has pressed a non-cursor key]. This is the basics, you will need to work some more bits out yourself as I don't have the time to go through it all. I gave some code to Walt sometime ago that does what you want (and more). Contact him to find out where it is. The function you require is called pop_get_line. This method works fine in versions of 4GL up until 4.12, I have not tested later versions but see no reason why it should not work. Mark Denham BBC London, UK Mark.Denham@bbc.co.uk