The Edit Menu Item Dialog

The Edit Menu Item dialog can be displayed by either double clicking anywhere within a menu item form field object or selecting the menu item and clicking on the "attribute edit" icon in the tool bar. This dialog presents the current attributes of the menu item. The dialog consists of three sections: identification, appearance, and properties.

Identification Section

This section displays naming and other identifying information for the menu item object.

Item Name

This field contains the name of the menu item. The Screen Painter automatically generates a unique name for it. This name can be maintained or changed, as long as the new name conforms to the Zim Object Naming Rules.

Menu Name

This field contains the name of the menu in which the menu item was created. The field can be viewed by selecting it and scrolling left and right, but its value cannot be changed.

Directory

This field contains the name of the Zim directory that owns the menu in which the menu item was created. The field can be viewed by selecting it and scrolling left and right, but its value cannot be changed.

Item Number

This field contains an automatically generated identifying number for the menu item. The value in this field can be used to identify the menu item when it is selected. Refer to Menu Items and Callback Events for more detailed information about the relationship between menu item selection and callback events. The value in this field can be changed and need not be unique.

Item Tag

This field contains an identifying text string for the menu item. The value in this field can be used to identify the menu item when it is selected. Refer to Menu Items and Callback Events for more detailed information about the relationship between menu item selection and callback events. The value in this field can be changed and need not be unique. If left blank (the default), the value contained in Item Name is used for Item Tag.

Appearance Section

This section presents the display or appearance attributes of the menu item object.

Suppress

This field determines if the menu item appears in the menu item list by default. The suppress attribute of all menu items can be dynamically modified under Zim program control.

Style / Text Item

This field determines if the menu item has a non-blank text string associated with it. All menu items that appear on the bar can only be text items. Menu items that belong to the list of items underneath a menu bar item can be text items or horizontal separators, as long as they are not the parent menu item for another menu item list. If a menu item is the parent for another list of menu items it is called a "Cascade" menu item. Cascade menu items must have associated text and cannot be horizontal separators. The availability of the fields Text Item, Horizontal Separator and Cascade Text Item changes depending on the location and properties of the menu item being edited.

Style / Horizontal Separator

If this field is available and selected, it causes the menu item to become a single line horizontal separator within the menu item list. The width of the line dynamically expands or contracts to match the width of the widest text menu item in the list.

Style / Cascade Text Item

This field is never available. It is automatically set by the painter when the menu item being edited is the parent item of another list of menu items (i.e. a list which "cascades" off from this item).

Style / Text

This field contains the text (called the "label") to appear in the menu item. The field is not available if the menu item is a horizontal separator. The menu item list dynamically adjusts its width to accommodate the menu item with the longest text. Two special character sequences can be included in the text. The sequence "\t" is interpreted as an instruction to align the remainder of the text at the next tab stop. The sequence "\r" is interpreted as an instruction to align the remainder of the text flushed right. These sequences are often used to separate and vertically align the text which identifies the "accelerator key" ("fast key", "shortcut key") for the menu item from its descriptive text.

Toolbar Button Properties

This push button displays the Toolbar Button Properties Dialog that enables a toolbar button to be associated with this menu item.

Properties Section

This section presents the behavioral attributes of the menu item.

Availability

This field determines the default "availability" attribute of the menu item. The values are "Available" and "Unavailable". Refer to Form Field Availability Attributes for a more detailed description of the characteristics of these different availability values.

Associated Action

This field identifies the action that is to be associated with the menu item. The default value is "User Defined", which means that no special system action is associated with the menu item. Rather it is the responsibility of the application program to determine what action it takes if the menu item is selected. The available system actions include such operations as "Cut", "Copy", "Paste", "Exit Application", etc.
Two variations of "User Defined" are also available. These are "User Defined Toggle" and "User defined Optional". These correspond to menu items which have an associated check mark to indicate if some user-defined "state" associated with the menu item is either "On" or "Off". "Toggle" means that multiple menu items may be in the "On" state simultaneously. "Optional" means that only one menu item from the set of all "optional" menu items in a list may be in the "On" state at any one time. If either the "User Defined Toggle" or "User Defined Optional" actions are selected, the Customize push button becomes available.

Customize

This push button is available only if the action value in Associated Action is either "User Defined Toggle" or "User Defined Optional". It displays the Customize Menu Item Values dialog that enables additional attributes of these types of menu items to be viewed and modified.

Dialog Push Buttons

OK

This push button performs any required data validation, commits any changes that were made in this dialog, and all sub-dialogs, and returns to the Screen Painter's layout mode.

Cancel

This push button discards any changes that were made in this dialog and all sub-dialogs, and returns to the Screen Painter's layout mode.

Help

This push button invokes the Zim Help facility, initially displaying the section entitled Edit Menu Item dialog (this section).