Provides access to members that define a multiItem.
Product Availability
Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.
Description
A MultiItem can be used when items on a menu can't be determined prior to runtime or the items need to be modified based on the state of the system. A good example of this is the menu items at the bottom of the File menu representing the most recently used files. The IMultiItem interface allows a single object to act like several adjacent menu items. During runtime, the framework will notify MultiItem commands when their host menu is about to be shown. At this point, all the commands implementing IMultiItem can query the system to determine how many items should be represented and how each should appear.
When To Use
If you want to create a custom multiItem, you must implement the IMultiItem interface in your class code. This interface allows you to assign properties such as caption, bitmap, enabled state, and checked state to each item. It also defines what action happens when an item in the multiItem is clicked. You do not implement the ICommand interface when creating a MultiItem.
You may also want to implement the IMultiItemEx interface in order to assign message, helpfile and helpcontextid properties to each item.
You should also create a custom menu with your custom multiItem on it since multiItems can only appear on menus. MultiItems are never added to the commands list in the Customize dialog so you need to use a custom menu to provide access to the multiItem in the application.
You should also create a custom menu with your custom multiItem on it since multiItems can only appear on menus. MultiItems are never added to the commands list in the Customize dialog so you need to use a custom menu to provide access to the multiItem in the application.
Members
Description | ||
---|---|---|
Caption | The caption of the multiItem. | |
HelpContextID | The help context ID associated with this multiItem. | |
HelpFile | The name of the help file associated with this multiItem. | |
ItemBitmap | The bitmap for the item at the specified index. | |
ItemCaption | The caption of the item at the specified index. | |
ItemChecked | Indicates if item at the specified index is checked. | |
ItemEnabled | Indicates if the item at the specified index is enabled. | |
Message | The status bar message for all items on the multiItem. | |
Name | The name of the multiItem. | |
OnItemClick | Occurs when the item at the specified index is clicked. | |
OnPopup | Occurs when the menu that contains the multiItem is about to be displayed. |
CoClasses that implement IMultiItem
CoClasses and Classes | Description |
---|---|
ControlsMapBookmarksMultiItem (esriControls) | Current bookmarks of focus map. |
MultiItem (esriFramework) | MultiItem CoType. |
RasterTableShowMultiItem (esriArcMapUI) | A coclass shows multi-item menu of a RasterTable. |