Option pull-down menus are similar to text pull-down menus, except that they add the capability to include non-text menu items. The currently selected choice is indicated by a right-pointing triangle on the left side of an option menu item. Option pull-down menus can display either text strings or icons, but not both. Option pull-down menus cannot have submenus.
The option pull-down menu item is defined in a resource file with the following structure:
The DItem_PulldownOptionMenuRsc structure has the following unique fields. (See "Common item resource fields" for a description of any field not in this table.)
|attributes||Specifies the attributes of the option pull-down menu. This field will normally be ON | ALIGN_LEFT and is constructed by combining the constants from the attributes table (below) with the logical OR operator.|
|menuTitle||Contains the title of the menu. It should be set to "" if the option pull-down menu is a submenu. (In this case, its title cannot display). |
Put a `~' before the character in the title that will be the mnemonic. The mnemonic is the key the user presses to display the menu when navigating the menu bar with the keyboard.
|pulldownOptionItems||Represents an array of DItem_PulldownOptionItemRsc. This structure is the same as the DItem_OptionButtonItemRsc structure. See the description of the option button item for more information on the fields of this structure.|
The following table lists possible values for the attributes field (described above) and the meaning of those values:
|ON||The option pull-down menu will be initially enabled.|
|OFF||All subitems in the option pull-down menu will be disabled (dimmed). The title of the menu will also be dimmed (if the pull-down menu is not a submenu).|
|ALIGN_LEFT||This attribute is ignored for submenus. The pull-down menu will be aligned on the left side of the menu bar.|
|ALIGN_RIGHT||This attribute is ignored for submenus. The pull-down menu will be aligned on the right side of the menu bar. By convention, only a Help menu should be right aligned.|
The following is an example of an option pull-down menu resource. This item is the MicroStation Command window Element Style submenu, and is defined in MicroStation's resource file.
The following messages are sent to item hook functions that are attached to option pull-down menus:
DITEM_MESSAGE_CREATE DITEM_MESSAGE_DESTROY DITEM_MESSAGE_BUTTON DITEM_MESSAGE_GETSTATE DITEM_MESSAGE_SETSTATE DITEM_MESSAGE_STATECHANGED DITEM_MESSAGE_QUEUECOMMAND
|mdlDialog_optionPDMItemGetInfo||retrieves detailed information about a particular menu item in an option pull-down menu.|
|mdlDialog_optionPDMItemSetInfo||sets various aspects of a menu item in an option pull-down menu.|
|mdlDialog_optionPDMItemInsert||inserts a menu item in an option pull-down menu.|
|mdlDialog_optionPDMItemSetEnabled||changes an option pull-down menu item's state (enabled or disabled).|