This chapter provides information about creating and editing form resources using Palm OS Resource Editor.
Working with Forms Overview ^TOP^
To work with forms, start Palm OS Resource Editor and open the resource file you want to edit, as described in "Opening a Resource Description File in Resource Editor".
You can either create a new form or edit an existing form.
Creating a New Form ^TOP^
To create a new form:
- In the Files pane, select the resource description (XRD) file to which you want to add the form.
- In the main menu bar, select Edit > New Resource. The New Resource dialog box appears.
- In the New Resource dialog box, select Form and then click the New button.
- The name and number of the new form appear in the Files pane, and the form is displayed in the Form Editor. For information on how to edit the form, see "Modifying an Existing Form".
Modifying an Existing Form ^TOP^
To modify an existing form:
- In the Files pane, select the form resource you want to modify. When you select a form resource, the form's properties are displayed in the Properties pane.
- In the Files pane, double-click the form resource to display it in the Form Editor. The Form Editor appears. Now you can edit the form in the following ways:
- To edit the form's title, use the Properties pane. See "Editing a Form's Title" for details.
- To edit popup lists in the form, see "Editing Popup Objects".
- To add items to the form, use the tools in the Toolbox. The Toolbox is located on the left side of the Form Editor. For detailed information about the tools, see "Using the Toolbox".
- To modify items in the form, you can drag and drop items in the Form Editor, or use the Form menu in the Resource Editor menu bar, or use the Form Editor toolbar. For detailed information about the Form Editor toolbar, see "Using the Toolbar".
- To add a form navigation resource for this form, select Form >Create Navigation Resource. For more information, see "Creating a Form Navigation Resource".
- To change form properties, go to the Properties pane and double-click the property you want to change.
- When you are finished modifying the form, you can save it using the Save or Save As menu items.
Editing a Form's Title ^TOP^
To edit a form's title:
- In the Form Editor, click the form's title.
- In the Properties pane, double-click the Title attribute's value.
- Edit the title.
Editing Popup Objects ^TOP^
Popup lists cannot be edited directly in the Resource Editor. Instead, you create a Popup Trigger Object and add items to a list object associated with that trigger.
- Create a list object.
- Create a popup trigger object.
- Select the popup trigger object. In the Properties Pane for the popup trigger object, click the List ID value and enter the resource ID for the list object you created in the first step. This value links the popup trigger object to the list object.
Using the Toolbar ^TOP^
When the Form Editor is active, the Form Editor displays a toolbar near the top of the Palm OS Resource Editor window. The icons in the toolbar are alternatives for selecting certain menu items. From left to right, the items on the toolbar are:
- Change display density and size
- Change display depth (bits per pixel)
- Change locale
- Align Lefts
- Align Rights
- Align Tops
- Align Bottoms
- Center Vertically
- Center Horizontally
- Make Same Width
- Make Same Height
- Make Same Size
The first three items are always enabled. The remaining items are enabled only when you select objects in the form.
Using the Toolbox ^TOP^
The Toolbox appears on the left side of the Form Editor. The Toolbox displays a palette of resources you can add to the form. It also displays a pointer tool.
When you select a tool in the Toolbox, it becomes active. For some tools, you can use drag-and-drop to add content to the form. You can also double-click some tools to add content to the form.
The Pointer Tool ^TOP^
The pointer tool is used to select, move, and resize form objects. It can only be selected. It cannot be dragged and dropped, nor does double clicking perform any action.
How the pointer tool behaves depends on a number of factors, including:
- Hit location (whether a selected item, unselected item, or no item was hit)
- Modifier keys (whether the Shift key, Control key, both, or neither are pressed)
- Mouse action (whether the user just clicks, or clicks and drags out a selection)
Toolbox Pane ^TOP^
All tools but the pointer tool represent form objects that can be added to the form. Dragging a tool from the toolbox to the form creates a new form object of the dragged type at the location indicated by the drag and drop feedback. Double-clicking a tool creates a new form object of the clicked type at a default location in the form near the top left corner of the form.
When a tool is selected, the cursor changes to a cross-hair cursor while it is over the form, and you can sketch out a new form object of the indicated type at a desired location and with a desired size.
You can use the Toolbox pane to create the form objects listed in Table 3.1. The following tables describe the properties of form objects. To see the properties of a form object, open the Form Editor and click the visual representation of an object on the form
Table 3.1 Toolbox objects
Button Object
The button object creates a command button. Most forms have a single row of command buttons at the bottom of the form.
Table 3.2 Button object attributes
Attribute
|
Description
|
Comment
|
Name of the form object. Must be a valid C name—for instance, it cannot have spaces.
|
ID
|
Integer ID assigned by Resource Editor.
|
Left
|
1 for left-most button on modeless form.
5 for left-most button on modal form.
Determine left origin for button n by:
button(n-1) left + button(n-1) width + 6
|
Top
|
147 or 160 – height – 1 for modeless forms
formHeight – buttonHeight – 5 for modal forms
|
Width
|
36
or label width + 10
|
Height
|
12
or font height + 3 if not using standard font
|
Usable
|
Uncheck this box if you don't want the object to appear on the screen initially.
Nonusable objects can programmatically be set to usable.
|
Enabled
|
Uncheck this box if you don't want the user to be able to interact with the object initially.
Non-enabled objects can programmatically be set to enabled.
|
Text
|
Text displayed inside the button.
|
Font
|
Specifies the font used by the form object: STD_FONT, BOLD_FONT, LARGE_FONT SYMBOL_FONT, SYMBOL_11_FONT, SYMBOL_7_FONT, LED_FONT LARGE_BOLD_FONT
|
Left Anchor
|
Controls how the object resizes itself when its text label is changed. If checked, the left bound of the object is fixed; if unchecked, the right bound is fixed.
|
Frame
|
The BUTTON_FRAME element is used to specify the frame used by the form object. The element may be specified as one of the following enum values:
NO_BUTTON_FRAME, STANDARD_BUTTON_FRAME, BOLD_BUTTON_FRAME, RECTANGLE_BUTTON_FRAME
|
Checkbox Object
The checkbox object creates a check box. Check boxes often appear in a group. If so, the group should be non-exclusive (so that the user can enable multiple check boxes) and should be aligned vertically or horizontally. If you want to make sure that only one of a series of options is selected, use push buttons or a list instead of check boxes.
Table 3.3 Check box resource attributes
Attribute
|
Description
|
Comment
|
Name of the form object. Must be a valid C name—for instance, it cannot have spaces.
|
ID
|
Integer ID assigned by Resource Editor.
|
Left
|
Form-relative position of left side of object.
|
Top
|
Form-relative position of top of object.
|
Width
|
Determined at runtime.
|
Height
|
12 pixels minimum
Height determines tappable area
Check box is always centered in chosen height
|
Usable
|
Uncheck this box if you don't want the object to appear on the screen initially.
Nonusable objects can programmatically be set to usable.
|
Enabled
|
Uncheck this box if you don't want the user to be able to interact with the object initially.
Non-enabled objects can programmatically be set to enabled.
|
Text
|
Text displayed to the right of the check box.
|
Font
|
Use Bold font for most check boxes.
|
Selected
|
Initial selection state of the check box. If this box is checked (the default), the check box is initially checked.
|
Group ID
|
Do not use.
|
Feedback Slider Object
The feedback slider object creates a feedback slider. The difference between a feedback slider and a regular slider is that feedback sliders send ctlRepeatEvent
s while the user drags the slider thumb. The regular slider sends a single ctlSelectEvent
when the user is done dragging the thumb.
Table 3.4 Feedback slider object attributes
Attribute
|
Description
|
Comment
|
Name of the form object. Must be a valid C name—for instance, it cannot have spaces.
|
ID
|
Integer ID assigned by Resource Editor.
|
Left
|
Form-relative position of the left side of the object.
|
Top
|
Form-relative position of top of object.
|
Width
|
The default background bitmap looks best at these widths: 72, 93, 114, 135, or 156
|
Height
|
15
or height of thumb bitmap
|
Usable
|
Uncheck this box if you don't want the object to appear on the screen initially.
Nonusable objects can programmatically be set to usable.
|
Enabled
|
Uncheck this box if you don't want the user to be able to interact with the object initially.
Non-enabled objects can programmatically be set to enabled.
|
Value
|
Initial setting of the slider thumb.
|
Minimum
|
Minimum value the slider can represent.
|
Maximum
|
Maximum value the slider can represent.
|
Page Size
|
Amount by which the thumb moves if the user taps to its left or right.
|
Thumb Bitmap
|
ID of the bitmap resource or bitmap family resource used to create the thumb. Use 0 to use the default thumb bitmap.
|
Background Bitmap
|
ID of the bitmap resource or bitmap family resource used to create the background. Use 0 to use the default background bitmap.
|
Field Object
Use the field object to create an editable text field that is either a single-line long or multiple lines long. You can also use the field resource to create noneditable text that is displayed on the form. It is easier to use noneditable text fields instead of labels if the text of the label changes dynamically.
Table 3.5 Field object attributes
Attribute
|
Description
|
Comment
|
Name of the form object. Must be a valid C name—for instance, it cannot have spaces.
|
ID
|
Integer ID assigned by Resource Editor.
|
Left
|
Form-relative position of left side of object.
|
Top
|
Form-relative position of top of object.
|
Width
|
Ideally wide enough to show maximum characters
|
Height
|
11 or font height + 2 for single-line fields
For multi-line fields, a multiple of the line height.
|
Usable
|
Uncheck this box if you don't want the object to appear on the screen initially.
Nonusable objects can programmatically be set to usable.
|
Editable
|
If this box is checked, the field is editable. Noneditable fields don't accept user input but can be changed programmatically.
|
Underlined
|
Check this box for editable fields.
Uncheck for noneditable fields.
|
Single Line
|
Check this box for single-line fields so the field doesn't scroll horizontally and doesn't accept Return or Tab characters.
|
Dynamic Size
|
Uncheck this box if the Single Line box is checked.
Check this box if you want the field to grow as the user enters more characters.
|
Justification
|
Left-justify editable single-line fields. Right-justify single-line numeric fields or noneditable fields used as labels.
Not applicable to multi-line fields.
|
Max Chars
|
Maximum number of bytes that the user can enter into an editable field. Note that the number of bytes is not the same as the number of characters when multi-byte characters (for example, Japanese) are being used.
This attribute has no effect on noneditable fields.
|
Auto Shift
|
If checked, Graffiti or auto-shift rules are applied. This attribute should be enabled for most editable fields.
|
Has Scroll Bar
|
Check this box if you want to associate a scroll bar with a multi-line field.
|
Numeric
|
If checked, only the characters 0 through 9 and associated separators are allowed to be entered in the field. The associated separators are the thousands separator and the decimal character. The values of these two characters depend on the settings in the Formats preferences panel.
Note that numeric fields do not allow plus signs.
|
Max. Vis. Lines
|
Maximum number of lines visible for a multi-line entry field.
|
Form Bitmap Object
Use the form bitmap object to display a bitmap at a fixed location on a form. For example, an about dialog often displays the application icon along with the application name, version number, and other pertinent information. You can use a form bitmap resource to display the icon on this dialog.
Table 3.6 Form bitmap object attributes
Attribute
|
Description
|
Comment
|
Name of the form object. Must be a valid C name—for instance, it cannot have spaces.
|
ID
|
Integer ID assigned by Resource Editor.
|
Left
|
Form-relative position of left side of object.
|
Top
|
Form-relative position of top of object.
|
Bitmap ID
|
ID of a bitmap resource or bitmap family resource to be drawn in the specified location.
|
Usable
|
Uncheck this box if you don't want the object to appear on the screen initially.
Nonusable objects can programmatically be set to usable.
|
Gadget Object
A gadget object creates an application-defined resource. You must write code to draw the user interface element and respond to events associated with that element.
Table 3.7 Gadget object attributes
Attribute
|
Description
|
Comment
|
Name of the form object. Must be a valid C name—for instance, it cannot have spaces.
|
ID
|
Integer ID assigned by Resource Editor.
|
Left
|
Form-relative position of left side of object.
|
Top
|
Form-relative position of top of object.
|
Width
|
Width in pixels.
|
Height
|
Height in pixels
|
Usable
|
Uncheck this box if you don't want the object to appear on the screen initially.
Nonusable objects can programmatically be set to usable.
|
Visible
|
This value is set to TRUE when the gadget is drawn, and set to FALSE when the gadget is erased. FrmHideObject() sets this value to FALSE as well. You should set it explicitly in the gadget's callback function (if it has one) in response to a draw request.
|
Graffiti Shift Indicator Object
The Graffiti Shift Indicator (GSI) object should be displayed on all forms that contain an editable text field. After you place the GSI on a form, the system automatically displays the current shift status at that location.
Table 3.8 Graffiti Shift Indicator object attributes
Attribute
|
Description
|
Comment
|
Name of the form object. Must be a valid C name—for instance, it cannot have spaces.
|
Left
|
135 (modeless form)
142 (modal form)
|
Top
|
150 (modeless form)
form height – 13 (modal form)
|
Graphic Button Object
The graphic button object creates a command button whose label is a bitmap rather than a text label.
Table 3.9 Graphic button object attributes
Attribute
|
Description
|
Comment
|
Name of the form object. Must be a valid C name—for instance, it cannot have spaces.
|
ID
|
Integer ID assigned by Resource Editor.
|
Left
|
1 for left-most button on modeless form.
5 for left-most button on modal form.
Determine left origin for button n by:
button(n-1) left + button(n-1) width + 6
|
Top
|
147 or 160 – height – 1 for modeless forms
formHeight – buttonHeight – 5 for modal forms
|
Width
|
36
or label width + 10
|
Height
|
bitmap height + 3
|
Usable
|
Uncheck this box if you don't want the object to appear on the screen initially.
Nonusable objects can programmatically be set to usable.
|
Enabled
|
Uncheck this box if you don't want the user to be able to interact with the object initially.
Non-enabled objects can programmatically be set to enabled.
|
Bitmap ID
|
Resource ID of the bitmap family that draws the graphic on this button. Assign a resource ID that matches the bitmap you want to use.
|
Selected ID
|
Resource ID of the bitmap family that draws the graphic when the button is selected. It's important to provide a different graphic for the selected bitmap on a color screen. The default is to invert the pixels, which draws funny on a color screen.
|
Left Anchor
|
Controls how the object resizes itself when its bitmap is changed. If checked, the left bound of the object is fixed; if unchecked, the right bound is fixed.
|
Frame
|
The BUTTON_FRAME element is used to specify the frame used by the form object. The element may be specified as one of the following enum values:
NO_BUTTON_FRAME, STANDARD_BUTTON_FRAME, BOLD_BUTTON_FRAME, RECTANGLE_BUTTON_FRAME
|
Graphic Push Button Object
Use the graphic push button object to create a push button whose label is a bitmap rather than text. You usually create more than one push button at a time. Push buttons should be aligned horizontally or vertically and have no space between.
Table 3.10 Graphic push button object attributes
Attribute
|
Description
|
Comment
|
Name of the form object. Must be a valid C name—for instance, it cannot have spaces.
|
ID
|
ID assigned by Resource Editor.
|
Left
|
For a horizontal row of push buttons, the position of button(n) is:
button(n–1) left + button(n–1) width + 1
|
Top
|
All push buttons in same group have same top (if horizontal row).
|
Width
|
label width + 2 minimum
All push buttons in same group have same width.
|
Height
|
bitmap height + 3
All push buttons in same group have same height.
|
Usable
|
Uncheck this box if you don't want the object to appear on the screen initially.
Nonusable objects can programmatically be set to usable.
|
Enabled
|
Uncheck this box if you don't want the user to be able to interact with the object initially.
Non-enabled objects can programmatically be set to enabled.
|
Bitmap ID
|
Resource ID of the bitmap family that draws the graphic on this button. Assign a resource ID that matches the bitmap you want to use.
|
Selected ID
|
Resource ID of the bitmap family that draws the graphic when the button is selected. It's important to provide a different graphic for the selected bitmap on a color screen. The default is to invert the pixels, which draws funny on a color screen.
|
Group ID
|
Nonzero value between 1 and 65535 to identify the group.
If 0, the push button is not assigned to a group.
|
Graphic Repeating Button Object
Use the graphic repeating button object to create a repeating button whose label is a bitmap rather than text. A repeating button can look like a command button or not. The difference between the two is that the repeating button sends events repeatedly while the user holds the pen down on the button. Command buttons wait until the user releases the pen and then send a single event.
Table 3.11 Graphic repeating button object attributes
Attribute
|
Description
|
Comment
|
Name of the form object. Must be a valid C name—for instance, it cannot have spaces.
|
ID
|
Integer ID assigned by Resource Editor.
|
Left
|
Form-relative position of left side of object.
|
Top
|
Form-relative position of top of object.
|
Width
|
Width of object in pixels
|
Height
|
Height of object in pixels
|
Usable
|
Uncheck this box if you don't want the object to appear on the screen initially.
Nonusable objects can programmatically be set to usable.
|
Enabled
|
Uncheck this box if you don't want the user to be able to interact with the object initially.
Non-enabled objects can programmatically be set to enabled.
|
Bitmap ID
|
Resource ID of the bitmap family that draws the graphic on this button. Assign a resource ID that matches the bitmap you want to use.
|
Selected ID
|
Resource ID of the bitmap family that draws the graphic when the button is selected. It's important to provide a different graphic for the selected bitmap on a color screen. The default is to invert the pixels, which draws funny on a color screen.
|
Left Anchor
|
Controls how the object resizes itself when its bitmap is changed. If checked, the left bound of the object is fixed; if unchecked, the right bound is fixed.
|
Frame
|
The BUTTON_FRAME element is used to specify the frame used by the form object. The element may be specified as one of the following enum values:
NO_BUTTON_FRAME, STANDARD_BUTTON_FRAME, BOLD_BUTTON_FRAME, RECTANGLE_BUTTON_FRAME
|
Label Object
Use a label object to display noneditable text or labels on a form.
Table 3.12 Label object attributes
Attribute
|
Description
|
Comment
|
Name of the form object. Must be a valid C name—for instance, it cannot have spaces.
|
Label ID
|
Integer ID assigned by Resource Editor.
|
Left
|
Form-relative position of left side of object.
Leave 3 pixels of white space between the label and its control.
|
Top
|
Form-relative position of top of object.
Align labels with the top of the object they label.
|
Text
|
Text of the label. Typing a carriage return places a carriage return in the label text.
|
Font
|
Use Bold font for most labels.
|
Usable
|
Uncheck this box if you don't want the object to appear on the screen initially.
Nonusable objects can programmatically be set to usable.
|
List Object
Use a list object to create a stand-alone list or the list portion of a pop-up list. (The pop-up trigger resource defines the trigger for the pop-up list.)
Table 3.13 List object attributes
Attribute
|
Description
|
Comment
|
Name of the form object. Must be a valid C name—for instance, it cannot have spaces.
|
ID
|
Integer ID assigned by Resource Editor.
|
Left
|
Form-relative position of left side of object.
If creating pop-up list, use trigger left if trigger is left-aligned or trigger left – list width if trigger is right-aligned.
|
Top
|
Form-relative position of top of object.
If creating pop-up list, top is often set to trigger top. Palm OS repositions the list if necessary.
|
Width
|
5 + width of longest item label
10 + width of longest item label to allow scrolling
If creating a Categories pop-up list, the width is set at runtime.
Prior to Palm OS 3.5, if the list is narrower than one of its items, the list items would draw outside of the list. Take care to ensure that this does not occur with your interface.
|
Font
|
Use Standard font for most lists.
|
Usable
|
If creating a pop-up list, uncheck this box.
|
Num. Vis. Items
|
Number of items the list displays.
13 items for a full screen pop-up list
11 items for a full screen stand-alone list (modeless form)
10 items for a full screen stand-alone list (modal form)
0 for the Categories pop-up list (its size is determined at runtime)
Set to the total number of items in your list if less than these numbers.
|
Num. Items
|
Number of items in list.
|
Popup Trigger Object
A pop-up trigger object creates the pop-up trigger portion of a pop-up list.
Table 3.14 Pop-up trigger object attributes
Attribute
|
Description
|
Comment
|
Name of the form object. Must be a valid C name—for instance, it cannot have spaces.
|
ID
|
Integer ID assigned by Resource Editor.
|
Left
|
Form-relative position of left side of button.
Use 160 to align trigger with right edge of screen if it resizes to the left (Use this for Categories pop-up trigger.)
|
Top
|
Form-relative position of top of trigger.
|
Width
|
Determined at runtime.
For editing purposes, you can set to several pixels wider than the list to be sure you can select the trigger separately from the list.
|
Height
|
12
or font height + 3
|
Usable
|
Uncheck this box if you don't want the object to appear on the screen initially.
Nonusable objects can programmatically be set to usable.
|
Text
|
Usually leave this field blank and set the label programmatically.
|
Font
|
Use Standard font for most triggers.
|
Left Anchor
|
Check this box if the trigger should resize to the right when the label changes.
If the trigger is on the right edge of the screen and should resize to the left, uncheck this box.
Uncheck this box for the Categories pop-up trigger.
|
List ID
|
ID of the list resource to be popped up when the user taps the trigger.
|
Push Button Object
A push button object creates a push button. A group of push buttons represents a set of options where only one option can be selected at a time. You typically create several push buttons aligned horizontally or vertically.
Table 3.15 Push button object attributes
Attribute
|
Description
|
Comment
|
Name of the form object. Must be a valid C name—for instance, it cannot have spaces.
|
ID
|
ID assigned by Resource Editor.
|
Left
|
For a horizontal row of push buttons, the position of button(n) is:
button(n–1) left + button(n–1) width + 1
|
Top
|
All push buttons in same group have same top (if horizontal row).
|
Width
|
label width + 2 minimum
All push buttons in same group have same width.
|
Height
|
bitmap height + 3
All push buttons in same group have same height.
|
Usable
|
Uncheck this box if you don't want the object to appear on the screen initially.
Nonusable objects can programmatically be set to usable.
|
Enabled
|
Uncheck this box if you don't want the user to be able to interact with the object initially.
Non-enabled objects can programmatically be set to enabled.
|
Text
|
Specifies the text displayed inside the push button.
|
Font
|
Specifies the font used by the form object: STD_FONT, BOLD_FONT, LARGE_FONT SYMBOL_FONT, SYMBOL_11_FONT, SYMBOL_7_FONT, LED_FONT LARGE_BOLD_FONT
|
Group ID
|
Nonzero value between 1 and 65535 to identify the group.
If 0, the push button is not assigned to a group.
|
Repeating Button Object
The repeating button object creates a repeating button. Repeating buttons can look identical to command buttons or not. The difference between the two is that the repeating button sends events repeatedly while the user holds the pen down on the button. Command buttons wait until the user releases the pen and then send a single event.
The most common use of repeating buttons is to draw the scroll buttons in the lower-right portion of a form. They are also often used as increment/decrement arrows.
Table 3.16 Repeating button object attributes
Attribute
|
Description
|
Comment
|
Name of the form object. Must be a valid C name—for instance, it cannot have spaces.
|
ID
|
Integer ID assigned by Resource Editor.
|
Left
|
1 for left-most button on modeless form.
5 for left-most button on modal form.
Determine left origin for button n by:
button(n-1) left + button(n-1) width + 6
|
Top
|
147 or 160 – height – 1 for modeless forms
formHeight – buttonHeight – 5 for modal forms
|
Width
|
36
or label width + 10
|
Height
|
12
or font height + 3 if not using standard font
|
Usable
|
Uncheck this box if you don't want the object to appear on the screen initially.
Nonusable objects can programmatically be set to usable.
|
Enabled
|
Uncheck this box if you don't want the user to be able to interact with the object initially.
Non-enabled objects can programmatically be set to enabled.
|
Text
|
Specifies the text that appears inside the repeating button. Use "\x01 " to specify the scroll up button. Use "\x02 " to specify the scroll down button.
|
Font
|
Specifies the font used by the form object: STD_FONT, BOLD_FONT, LARGE_FONT SYMBOL_FONT, SYMBOL_11_FONT, SYMBOL_7_FONT, LED_FONT LARGE_BOLD_FONT
|
Left Anchor
|
Controls how the object resizes itself.
TRUE - the object's left bound is fixed.
FALSE - the object's right bound is fixed.
|
Frame
|
The BUTTON_FRAME element is used to specify the frame used by the form object. The element may be specified as one of the following enum values:
NO_BUTTON_FRAME, STANDARD_BUTTON_FRAME, BOLD_BUTTON_FRAME, RECTANGLE_BUTTON_FRAME
|
Scroll Bar Object
Use the scroll bar object to create a scroll bar.
Table 3.17 Scroll bar object attributes
Attribute
|
Description
|
Comment
|
Name of the form object. Must be a valid C name—for instance, it cannot have spaces.
|
ID
|
Integer ID assigned by Resource Editor.
|
Left
|
Specifies, in standard coordinates, the left-most edge of the form object.
|
Top
|
Specifies, in standard coordinates, the top-most edge of the form object.
|
Width
|
Specifies, in standard coordinates, the width of the form object.
|
Height
|
Specifies, in standard coordinates, the height of the form object.
|
Usable
|
Uncheck this box if you don't want the object to appear on the screen initially.
Nonusable objects can programmatically be set to usable.
|
Value
|
Initial setting for the scroll bar.
|
Text
|
Specifies the text that appears inside the repeating button. Use "\x01 " to specify the scroll up button. Use "\x02 " to specify the scroll down button.
|
Minimum
|
The minimum value the scroll bar can represent.
|
Maximum
|
The maximum value the scroll bar can represent.
|
Page Size
|
Number of lines to scroll at one time. This value is often not set until run time. It should be one less than the number of lines that can be displayed at one time to provide context. That is, if the field can display ten lines of text, the page jump value should be nine.
|
Selector Trigger Object
Use the selector trigger object to create a selector trigger.
Table 3.18 Selector trigger object attributes
Attribute
|
Description
|
Comment
|
Name of the form object. Must be a valid C name—for instance, it cannot have spaces.
|
ID
|
Integer ID assigned by Resource Editor.
|
Left
|
Form-relative position of left side of button.
|
Top
|
Form-relative position of top of trigger.
|
Width
|
Determined at runtime.
For editing purposes, you can set to several pixels wider than the list to be sure you can select the trigger separately from the list.
|
Height
|
12
or font height + 3
|
Usable
|
Uncheck this box if you don't want the object to appear on the screen initially.
Nonusable objects can programmatically be set to usable.
|
Text
|
Specifies the text for the selector trigger on the form. Usually leave this field blank and set the label programmatically.
|
Font
|
Use Standard font for most triggers.
|
Left Anchor
|
Check this box if the trigger should resize to the right when the text changes.
If the trigger is on the right edge of the screen and should resize to the left, uncheck this box.
|
Slider Object
The slider object creates a slider.
Table 3.19 Slider object attributes
Attribute
|
Description
|
Comment
|
Name of the form object. Must be a valid C name—for instance, it cannot have spaces.
|
ID
|
Integer ID assigned by Resource Editor.
|
Left
|
Form-relative position of the left side of the object.
|
Top
|
Form-relative position of top of object.
|
Width
|
The default background bitmap looks best at these widths: 72, 93, 114, 135, or 156
|
Height
|
15
or height of thumb bitmap
|
Usable
|
Uncheck this box if you don't want the object to appear on the screen initially.
Nonusable objects can programmatically be set to usable.
|
Enabled
|
Uncheck this box if you don't want the user to be able to interact with the object initially.
Non-enabled objects can programmatically be set to enabled.
|
Value
|
Initial setting for the slider.
|
Minimum
|
Minimum value the slider can represent.
|
Maximum
|
Maximum value the slider can represent.
|
Page Size
|
Amount by which the thumb moves if the user taps to its left or right.
|
Thumb Bitmap
|
ID of the bitmap resource or bitmap family resource used to create the thumb. Use 0 to use the default thumb bitmap.
|
Background Bitmap
|
ID of the bitmap resource or bitmap family resource used to create the background. Use 0 to use the default background bitmap.
|
Table Object
Use the table object to create a table.
Creating a Form Navigation Resource ^TOP^
A form navigation resource is used in one-handed navigation.
It determines how the navigation highlight jumps from object to object when the one-handed navigation button is pressed. This resource defines a tab order for the right and left directions of the one-handed navigation button. To support the up and down directions, this resource specifies, for each object, which object lies directly above and which object lies directly below.
You can create a navigation resource for each form.
When creating a form navigation resource, you have two choices.
Hand-Coding the Form Navigation Resource ^TOP^
A form navigation resource is defined in XML as a FORM_NAVIGATION_RESOURCE
element. You can code the XML definition manually in the XML editor of Palm OS Resource Editor, if you choose. Make sure the form navigation resource has the same resource ID as its associated form. For reference information on the XML definition, consult the "Form Navigation Resource" section in Palm OS Resource File Formats.
To have Palm OS Resource Editor create a form navigation resource for you, see "Generating the Form Navigation Resource."
Generating the Form Navigation Resource ^TOP^
You can have Palm OS Resource Editor automatically generate a form navigation resource for your form. The resulting XML will define a navigation resource for the form. The right-left navigation is determined by the object IDs, sorted in ascending order. The up-down navigation elements —ABOVE_OBJECT_ID
and BELOW_OBJECT_ID
—are initialized to 0. In order to enable up-down navigation, you must specify, for each object, the object IDs of the above and below objects. You can fine-tune the default navigation resource in other ways, if desired.
To generate a a form navigation resource:
- In the Files pane, open the Form folder and select the form for which you wish to create a navigation resource.
- From the right-mouse popup menu, select Create Navigation Resource. The XML Editor appears, displaying the new navigation resource.
- Edit the XML definition, if required.