Form Object Characteristics

The elements that populate a form are called form objects. Before getting into the details of specific form objects, however, there are some important things to know about how forms deal with all form objects.

The form contains an array of form objects. Each form object has the following:

Data

For example, a checkbox contains a Boolean with the current checkbox value. A label contains the text and the font used for the label. A scrollbar contains the current scroll value, along with minimum and maximum values.

Index

The index is the (0-based) index of the form object within the form. Most (but, to keep you on your toes, not quite all) Form Manager routines require a form object index to specify a particular form object.

ID

The form object ID is a number that you specify for the form object in the form resource. These ID numbers are commonly unique across all forms (for example, the form object IDs for a form with ID 1000 would commonly have IDs 1001, 1002, 1003, and so on), but there’s nothing preventing form objects in different forms from sharing a common ID. You’ll need to convert an ID into an index number before calling most Form Manager routines.

Usable bit

A form object that is not usable is not drawn, and taps on it are ignored. A better name for this bit would probably have been visible.

What We Talk About Next

First, we will show you important form object events. Next, we cover APIs. Finally, we move to a description and code for each type of ...

Get Palm OS Programming, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.