Please enable JavaScript to view this site.

A-Shell Reference

Auto-complete can only be used with "simple" text fields (no radio buttons, checkboxes, date pickers, spinners, multi-line or forms).
The visible space occupied by the list will be the equivalent of about 5 "grid rows" below the INFLD control, unless the control is too close to the bottom of the parent window, in which case the list will display above the field. Note that even when the list displays above the field, you still use the Down-Arrow to move from the field to the list, the Up-Arrow to move back to the field from the list, and the Down-Arrow (or Ctrl+ Down-Arrow) from the last item of the list to request more items.
Internally, the list control is assigned exitcode -63 (VK_xF63). You should not have any controls in that range (-33 to -99 is generally reserved for A-Shell.)
When INFLD exits with exitcode 30 (asking the app to refresh the list data) or exitcode 31 (requesting more data), you must re-enter with a proper setdef string (as described above), or manually remove the existing list control. To make it easy to remove, list controls created by INFLD have the name "xtrInfldAutoComplete", and thus can be deleted using:

xcall AUI, AUI_CONTROL, CTLOP_DEL, "xtrInfldAutoComplete"

Obviously, you want to minimize the time the application takes to respond to exitcode 30. Characters typed during that interval should be queued up but won't appear until the application returns to INFLD.
There is no particular limit to how many items can be in the list, but as a matter of practicality or efficiency, you should keep it reasonably short. (For example, if the user enters "A" and pauses, you may not necessary want to generate a list with all of the items that start with "A".) The user can effectively request more items by pressing Ctrl+Down-arrow from the bottom of the list.
Requesting more items: If the user wants to see more items in the list, she can either type some more characters (effectively refreshing and narrowing the choices), or she can press Ctrl+Down-arrow from the last item in the list, which generates exitcode 31. Applications can respond to exitcode 31 by either building a longer list, or by replacing the current list with the next several items in sequence. Note that if you don't want to require the Control key for this purpose, add the advanced coldef option ScrollMode=Tree.