Forms
As we discussed earlier, a form is a container for the application’s visual elements. A form is created based on information from a resource (of type “tFRM”) that describes the elements. There are both modal and modeless forms in an application. The classic example of a modal form is an alert. Other forms can be made modal but require extra work on your part.
Note
A modal dialog is different from a modeless form in:
Appearance: a modal dialog has a full-width titlebar with the title centered and with buttons from left to right along the bottom. Most modal dialogs should have an info button that provides additional help.
Behavior: the Find button doesn’t work while a modal dialog is being displayed.
In the following material, we first discuss alerts and then modal forms. We also offer several tips in each section.
Alerts
An alert is a very constrained form (based on a “Talt” resource); it is a modal dialog with an icon, a message, and one or more buttons at the bottom that dismiss the dialog (see Figure 5.6). As we discussed in Chapter 3, there are four different types of alerts (information, warning, confirmation, and error). The user can distinguish the alert type by the icon shown.
Figure 5-6. An alert showing an icon, a message, and a button
The return result of FrmAlert is the number of the button that was pressed (where the first button is number 0).
Customizing an alert ...
Get Palm Programming: The Developer's Guide 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.