Problem:
To be able to control a ListView via the keyboard you need to set focus on the control. Is there a way of doing this?
Resolution:
Unfortunately the Dialog System SET-FOCUS function does not work with ListView controls. So, it is necessary to look at the control program and add the following code:
...
PROCEDURE DIVISION.
...
when "SET-FOCUS"
invoke Object-Reference "SetFocus"
...
This new function is then called from the screenset via the following code:
...
SET OBJECT-REFERENCE(1) LVIEW
MOVE "SET-FOCUS" call-function(1)
CALLOUT "lviewctl" 3 $NULL
...
Functions can also be added for hiding and showing the ListView control if required.