| Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
| Version 1.9 Build 1556 |
|
| Package | display | |
| Module | guiutils | |
| Tool | guiframework |
| button | button name | ||
| Allowed: | String | ||
| Default: | Valid button name | ||
| action | action functions | ||
| Allowed: | Glish function | ||
| Default: | Valid function | ||
The following code excerpt illustrates adding a command action.
action := [=];
action.dismiss := [=];
action.dismiss.text = 'Dismiss';
a := guiframework('My window', F, F, action);
a.addactionhandler('dismiss', a.dismiss());
This code excerpt illustrates adding a menu action. Note that for menus we concatenate the menu button names to produce the proper button name. So, the dismiss option of the file menu has a name of filedismiss. If you have cascading menus, you just keep concatenating names, i.e. options, browser, netscape becomes optionsbrowsernetscape.
menus := [=];
menus.file := [=];
menus.file::text := 'File';
.
.
.
menus.file.dismiss := [=];
menus.file.dismiss.text := 'Dismiss'
menus.options := [=];
.
.
.
a := guiframework('My app', menus, T, T)
a.addactionhandler('filedismiss', a.dismiss);