Dynamically Defining and Changing Menus
Defining and Displaying a Dynamic Cascade Menu
At the top level, defining a dynamic cascade menu is the same as defining a static cascade menu, except that you use a different entry template, a Dynamic Cascade template. This template has the same attributes as an ordinary Cascade Menu template, plus attributes that specify the panel constructor function and control the deletion of dynamically constructed templates.
To define a dynamic cascade menu:
- Clone a Dynamic Cascade template from the GMS Palette to a workspace.
- Set attributes of this template as needed for any cascade menu, as described in Chapter 3, Defining a Simple Menu..
- Set the
Gms-subpanel-constructor of the template to specify the appropriate panel constructor.
- Include the template in a menu specification just as you would any cascading menu entry.
GMS automatically creates and displays a dynamic cascade menu whenever you select its cascading menu entry. No special action is needed.
Copyright © 1997 Gensym Corporation, Inc.