The Menu Editor

Editing the menu tree of an application

The menu editor is a bit different from the other resource editors, because rather than being a collection of properties, a menu resource stores a tree of sub-menus and menu items.

Creating a sub-menu

After you create a menu resource, the first thing you will want to do is populate it with sub-menus. There are no top-level menu items in PalmOS: all menu items must be placed in a sub-menu.

Click the Add Submenu button to add a sub-menu to the edited menu resource. Editing the new submenu will start automatically. Click on the arrow next to the button to access stock menus common to PalmOS applications.

Sub-menus are only part of the user interface, they do not emit events themselves. Thus, sub-menus only have a label and don't have an ID.

Populating sub-menus

Menus can hold an arbitrary number of menu items and separators. Use the Add Item button to create a new menu item in the currently selected submenu.

A menu item has a label (the caption shown to the user), a resource ID (which is used by the application's event handler to distinguish menu item events) and an optional shortcut. The shortcut is a single letter that, when entered combined with the shortcut (\) character, emits the same event as if the corresponding menu item was tapped. Thus, in the example above, the user entering \u is the same as selecting "Undo" from the "Edit" menu.

Separators are used to group related menu items based on their function. Clicking the arrow next to the Add Item button to insert a new separator in the currently selected sub-menu.

Reordering menu items and submenus is done by grabbing the item with the left mouse button, and dragging it to a new position, or by clicking the Up and Down buttons on the right-hand side of the menu editor.

Sub-menus and menu items can be deleted with the Remove button. Removing a sub-menu deletes all its children as well.

The preview area

The area above the menu editor shows a simulated PalmOS screen displaying the currently edited menu. Click on a submenu title to view the menu items. Just like the form editor, this view shows the menus exactly as they will appear on a real PalmOS handheld.

When editing larger menus, you might need a little extra space. The preview area can be toggled on/off by clicking on the small triangle or the Menu Preview title.