PopupMenu object |
An AutoCAD cascading menu.
VBA class name: |
AcadPopupMenu |
---|---|
Create using: |
PopupMenus.Add |
Access via: |
PopupMenus.Item |
There are two types of AutoCAD menus:
A pull-down menu can contain up to 999 menu items. A shortcut menu can contain up to 499 menu items. If the number of menu items in a menu exceed these limits, AutoCAD ignores the extra items. If a pull-down or shortcut menu is taller than the available space on the graphics screen, it is truncated to fit on the screen.
The shortcut menu is a special menu in the base menu group. You can identify the shortcut menu by using the ShortcutMenu property.
To create a new menu, use the Add method to add a new PopupMenu object to the PopupMenus collection. To create a new shortcut menu, you must first delete any existing shortcut menu. There can be only one shortcut menu per menu group. If there is no other shortcut menu in a menu group, you can then add a menu with the label "POP0". This label will tell AutoCAD that you want to create a shortcut menu.
You can add new menu entries or separators to the menu using the AddMenuItem and AddSeparator methods. You can create submenus using the AddSubmenu method.
You can add the menu to the menu bar using the InsertInMenuBar method. Conversly, you can remove menus from the menu bar by using the RemoveFromMenuBar method.
To edit or query a menu, use the following methods and properties:
Methods |
Properties |
Comments? |