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.
For information, see “How menu items are named”.
On the General tab page in the Properties view, you can also specify how a menu item appears during execution.
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.
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.
To assign an accelerator key:
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.
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
To assign a shortcut key:
Select the menu item to which you want to assign a shortcut key.
Select the General tab in the Properties view.
Select a key from the Key drop-down list.
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.