All steps for processing a data form apply for forms with a scrollable region. The scrollable region is just another item on the form that the user can move to. The user enters a scrollable region by moving forward from the previous item, by using the Next Item or Previous Item keys (KEY_F8 and KEY_F7 by default), or by clicking the mouse within the scrollable region. Note that fields defined in a scrollable region are not items on the main form. Rather, they are a part of the scrollable region item.
When the user moves into the scrollable region, the CURSORFREE form option is temporarily turned ON, if it is not already, for the form. This allows the user the most flexibility in moving between fields in the scrollable region. To learn more about CURSORFREE and other form processing options, see Chapter 16, "Data Form Processing Options.".
Once in the scrollable region, input from the user is controlled by the scrollable region event table (SRETP). As with all event tables used by the system, the system event table (SYSETP) is searched first. If the event code is not found in the system event table, the form event table (FMETP) is searched. If the event code is not found in the form event table, the scrollable region event table (SRETP) is searched. See Chapter 37, "How Event Processing Works," for more information.
Keys used during editing of scrollable fields are the same as those used for data entry except that additional functionality is provided to move from field to field and to scroll the data rows in the scrollable region. Whenever the user moves to a data row that is not displayed, the system updates the form so that the current row is within the visible region. To move out of the scrollable region, the user simply requests to move to another item on the form by pressing the Next Item key (KEY_F8) or the Previous Item key (KEY_F7).
You can modify the scrollable region event table by changing the event code assignments. You can also write your own event functions and install them in the event table to provide the user with additional capabilities.
See the "Event Tables" section in the Function Reference for a complete listing of event code assignments used for scrollable regions. To learn more about modifying event tables and writing event functions, see Chapter 38, "Writing Event Functions," and Chapter 39, "Installing Event Functions and Modifying Event Tables." In addition, it is helpful to know how the form editor works and what functions you can call to assist you in moving between fields and accessing field and form information. See Chapter 29, "How Form and Menu Processing Works," for this information.
Naming Tip: Event functions that operate specifically in the scrollable region start with the abbreviation "ks_".