Previous Next Edit Rename Undo Search Administration
represents a popup menu, or one element of a popup menu.
Creating a popup menu.
A popup menu is built by creating a hierarchy tree of Menu objects.
- Each menu of the hierarchy having children becomes a sub-menu.
- Each leaf of the hirerachy tree becomes a menu entry.
- The root menu must be a top-level menu (see below).
To create a top-level menu, i.e. an entry in the menu bar, the window must be the parent object
of the menu.
As soon as a window has at least one visible
top-level menu, the window menu bar becomes visible.
Otherwise, it is hidden.
Menu entries are Menu objects having no child.
Note that Menu controls do not inherit the Control class
, and they do not raise any event
of the Control class.
The order of menu entries in its popup parent menu follows the order of the creation.
If the Text property
of a menu entry is void, then that menu entry is replaced by a separator.
Useless separators are automatically removed when the popup menu is shown.