Implementing Horizontally Scrollable Regions

In some applications, many fields or columns are required on one data row. This is the case in spreadsheet applications. Although scrollable regions are only implemented to scroll vertically, you can create a large number of columns by placing a scrollable region on a virtual form. A virtual form is a form that is larger than its window. Virtual forms are discussed in Chapter 14, "Virtual Data Forms."

The size of the visible portion of the scrollable region can be as wide as the virtual form. You can then place as many columns as can fit on one row of the scrollable region. When the form is displayed, the user can move horizontally through the fields on the row. The system will scroll the virtual form to keep the active field in the form window. Thus the columns will appear to scroll horizontally.

Designer: The tutorial program dspreadsheet.c gives a complete example of implementing a spreadsheet using a scrollable region on a virtual form. It uses a form created in the Designer.

Code: The tutorial program spreadsheet.c gives a complete example of implementing a spreadsheet using a scrollable region on a virtual form.


Home Contents Previous Next