Create a dynamic menu
- Last Updated: May 1, 2024
- 3 minute read
- OpenEdge
- Version 13.0
- Documentation
This final section shows you how to create a dynamic menu for a window. Dynamic menus share the
same characteristics of static menus. As with other dynamic objects, you use
CREATE statements rather than DEFINE statements to
create a menu, submenu, or menu item. You parent these objects together in a hierarchy
by setting their PARENT attribute. If you need to delete a dynamic menu
before its widget pool is deleted, you use the DELETE OBJECT statement
to delete the top-level menu object. The AVM automatically deletes all its child
submenus and menu items.
When you define a static menu, you need to define its elements in reverse order, so that
you define the submenus before you reference them in the static DEFINE
MENU statement. With dynamic menus you do the opposite. You first define
the top-level menu, then its submenus, and then each submenu’s menu items. As you create
each one, you parent it to the next level up to establish the menu hierarchy.