A single menu item on an AutoCAD pull-down menu.
Supported Platforms: Windows only
Class Information
- Class Name
-
AcadPopupMenuItem
- Object Inheritance
-
Object AcadPopupMenuItem
- Create Using
-
VBA
PopupMenu.AddMenuItem PopupMenu.AddSeparator PopupMenu.AddSubmenu
- Access Via
-
VBA
PopupMenu.Item
Members
These members are part of this object:
Methods |
Properties |
Events |
---|---|---|
None |
Remarks
A popup menu item represents an entry in a menu. There are three types of popup menu items available:
- Simple menu item (a menu that contains no submenu items)
- Separator (a border that appears on a menu)
- Submenu (a menu containing submenu items)
Simple menu items have an index, a label, a tag, and a macro. The index is the position on the menu where the individual menu item is located. The label is a string that defines the content and formatting of the menu item as it appears to the user. The tag is a string consisting of alphanumeric and underscore (_) characters. This tag uniquely identifies the menu item within a given menu. Menu items may have identical labels within the menu, but they cannot have identical tags. The end user does not see the tag. The macro is a series of commands that execute specific actions when a menu item is selected.
Submenu items also have an index, a label, and a tag. They do not have a macro associated with them. Instead, they have an entire PopupMenu object associated with them. This PopupMenu object is the menu that appears when the user selects the submenu item. To find a PopupMenu object associated with a submenu item, use the SubMenu property.
Separators have only an index. The index for a separator specifies where on the menu the separator is to appear.
To add a new menu item, use the AddMenuItem , AddSeparator , or AddSubmenu methods.