Setting General properties

This section describes the properties you can set when you select a menu item and then select the General tab page in the Properties view.

Unlocking menu item names

For information, see “How menu items are named”.

Setting the appearance of a menu item

On the General tab page in the Properties view, you can also specify how a menu item appears during execution.

Table 13-2: Setting display properties for menu items

Property

Meaning

Visible

Whether the menu item is visible. An invisible menu item still displays in the WYSIWYG and Tree Menu views, but does not display during execution. In the WYSIWYG Menu view, the text of an invisible item has a dithered (faded and dotted) appearance.

Enabled

Whether the menu item can be selected.

Checked

Whether the menu item displays with a check mark next to it.

ShiftToRight

Whether the menu item shifts to the right (or down for a drop-down or cascading menu) when you add menu items in a menu that is inherited from this menu. Selecting this property allows you to insert menu items in descendent menus instead of being able to add them only to the end.

For more information, see “Inserting menu items in a descendent menu”.

The settings you specify here determine how the menu items display by default. You can change the values of the properties in scripts during execution.

Assigning accelerator keys

A menu item can have an accelerator key, also called a mnemonic access key, which allows users to select the item from the SIP by pressing the designated key, or from a peripheral keyboard by pressing Alt+key when the menu item is displayed. Accelerator keys display with an underline in the menu item text.

It is not standard practice to include accelerator keys in Windows CE applications. In applications deployed to a Windows CE device or emulator, accelerator keys do not display well for menu bar items. Therefore, if used at all, accelerator keys should be used only in drop-down menus.

StepsTo assign an accelerator key:

  1. Type an ampersand (&) before the letter in the menu item text that you want to designate as the accelerator key.

    For example, &Open designates the O in Open as an accelerator key and Co&py designates the p in Copy as an accelerator key.

    NoteDisplaying an ampersand in the text If you want an ampersand to display in the menu text, type two ampersands. For example, Fish&&Chips displays as Fish&Chips with no accelerator key. To display Fish&Chips as the menu text with the C underlined as the accelerator, type Fish&&&Chips.

Assigning shortcut keys

Shortcut keys are combinations of keys that a user can press to select a menu item whether or not the menu is displayed. Although it is not standard practice to use shortcut keys in Windows CE applications, PocketBuilder permits you to define them for use in your applications.

If you specify the same shortcut for more than one MenuItem, the command that occurs later in the menu hierarchy is executed.

Some shortcut key combinations, such as Ctrl+C, Ctrl+V, and Ctrl+X, are commonly used by many applications. Avoid using these combinations when you assign shortcut keys for your application.

Figure 13-3: Shortcut key selection box in Properties view

Shown is the bottom of the General tab for the Menu control Properties view. It has a drop down list with the label Shortcut Key. Below the drop down list are check boxes for Shortcut Alt, Shortcut Control, and Shortcut Shift.

StepsTo assign a shortcut key:

  1. Select the menu item to which you want to assign a shortcut key.

  2. Select the General tab in the Properties view.

  3. Select a key from the Key drop-down list.

  4. Select Shortcut Alt, Shortcut Ctrl, and/or Shortcut Shift to create a key combination.

    PocketBuilder displays the shortcut key next to the menu item name. Note that the SIP does not have an Alt key.