Creating a Scrollable Region

To create a scrollable region for a data form, you first define the region and then the fields that will appear in the scrollable region. You can put any standard data field type, toggle field, or spin button in a scrollable region. Memo fields, radio buttons, and pushbuttons cannot be put in a scrollable region.

Designer: See the Designer User's Guide for more information about creating scrollable regions in the Designer.

Code: To define the scrollable region, you call a function and pass the area of the form the region will cover, the type of border to put around the region, the number of underlying data rows, and a pointer to a data structure to store the data for the scrollable region.

After defining the scrollable region, you define the prompts and fields for the first row of the scrollable region. The system automatically generates prompts and fields for the rest of the visible rows. You can define as many prompts and fields as will fit in one row of the visible region. Remember that the user is moved from item to item in the order that they were defined.

The data fields in a scrollable region are like any other data field on the data form, with one important exception. While a data field outside of a scrollable region is most commonly associated with a single underlying data variable throughout form processing, a data field in a scrollable region is associated with whatever underlying data variable the user has just scrolled into it. This means that any changes you make to a data field in a scrollable region stay with that data field, not with the underlying data variable as it scrolls up or down. The data field, itself, does not scroll; it remains stationary. The underlying data scrolls into and out of the "hole" that is provided by the stationary data field.

All options and settings for data fields are available for fields in a scrollable region. Remember that when you set an option or change a setting for a data field in a scrollable region, that option or setting remains associated with that field. The option or setting does not scroll with the underlying data when the data is scrolled.


Home Contents Previous Next