| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (9 out of 12)

Defining and Displaying a Dynamic Popup Menu

At the top level, defining a dynamic popup menu is the same as defining a static popup menu, except that you use a different root template: a Dynamic Popup template. This template has the same attributes as an ordinary Popup Menu template, plus attributes that specify the panel constructor function and control the deletion of dynamically constructed templates. These attributes are shown in the following table.

To define a dynamic popup menu:

  1. Clone a Dynamic Popup template from the GMS Palette to a workspace.

  2. Set attributes of this template as needed for any popup menu, as described in Chapter 6, Defining Popup Menus.

  3. Set the Gms-subpanel-constructor of the template to specify the appropriate panel constructor.

Displaying a dynamic popup is the same as displaying an ordinary popup.

To display a dynamic popup menu:

or:

or:


Note: In a static menu GMS automatically checks and unchecks menu entries on a gms-change-mode-template. In a dynamic menu, the checking and unchecking of gms-change-mode-template menu entries does not happen automatically. It is done using the API procedures gms-check-menu-entry, gms-uncheck-menu-entry, and gms-menu-entry-is-checked. For more information on these procedures see
Checking and Unchecking Menu Entries.

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (9 out of 12)

Copyright © 1997 Gensym Corporation, Inc.