Re: HIGHLIGHTS IN DISPLAY ARRAY
Posted in 1992
In article <1ffqekINNq5c@emory.mathcs.emory.edu>, dave.snyder@snide.com (Dave Snyder) writes: > > Quoting Randall Rhea... > } > } shemminga@cix.compulink.co.uk (Stuart Hemming) writes: > } > } >I apologise if this is an FAQ but is it possible, using 4GL and SE > } >under Inactive unix, to have the entire screen record highlighted (in > } >reverse video) when moving up and down in display array? > } > } No, but you can use an INPUT ARRAY. Put INPUT ARRAY inside of > } a WHILE loop. In the BEFORE FIELD clause, do a DISPLAY ATTRIBUTE(REVERSE), > } then a regular DISPLAY in the AFTER FIELD clause. > } > If only it were that simple! You need to disable the INSERT and DELETE keys, > not allow ADDING of data at the end of the list, and not allow UPDATING of the > data that is already there. There is definately alot of "behind the scenes" > coding that has to be done. > I have a suggestion for you that makes this much simpler. Include an extra field both in the screen array and program array for "cursor control". Define all of the fields except the extra "cursor control" field as NOENTRY in the form file. Define the cursor control field with a PICTURE = " ". Now the data cannot be changed, and nothing can be entered in the cursor control field. You still have to disable insert and delete. And you have to keep the cursor from scrolling off the end of the list. The best way I've found to do this is by checking the current array position against the total number of records in the array in the AFTER FIELD logic of the cursor control field. For example: AFTER FIELD cursor_control IF array_current = total_records THEN ERROR "There are no more records in the direction you are going!" NEXT FIELD cursor_control END IF Hope this helps. Chris S.