Progress
Programming
Handbook


Properties of Dynamic Menus

As discussed in the first part of this chapter, a menu bar has a window for an owner, while a pop-up menu has an associated widget. The owner widget has a readable and setable MENUBAR or POPUP–MENU attribute that allows you to set or query the ownership status of a widget. The menu widget has a read-only OWNER attribute that returns the widget handle of the owner widget. You can reset the MENUBAR or POPUP–MENU attribute to a different menu widget handle at any point in your application. Progress automatically replaces the first menu with the second after you reset that attribute.

If your application deletes a menu widget, Progress finds the owner widget that refers to it and sets its ownership attribute to unknown (?). Progress then automatically deletes all the children or descendents of that menu widget.

Like all dynamic widgets, the menu widgets go into a widget pool. You can specify a widget pool with the IN WIDGET–POOL clause of the CREATE statement. If you do not specify a widget pool, the menu widget is created in the default unnamed widget pool. Should you, however, specify a widget pool that does not exist, Progress stops its execution of the procedure. The menu widget exists until you explicitly delete it with the DELETE WIDGET statement or until the widget pool is deleted.

You cannot set the geometry of menu, submenu, and menu item widgets; that is, you cannot set characteristics such as X, Y, ROW, COLUMN, WIDTH, HEIGHT, HEIGHT–ROWS, and WIDTH–COLUMNS. These characteristics are all fixed and set by Progress.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095