Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
![]() | Version 1.9 Build 1556 |
|
Package | display | |
Module | widgets | |
Tool | helpmenu |
parent | Parent of the menu | ||
Allowed: | Tk frame | ||
menuitems | User defined help items | ||
Allowed: | string vector | ||
Default: | unset | ||
refmanitems | Reference manual locations for each menuitems | ||
Allowed: | string vector | ||
Default: | unset | ||
callback | Callback function for non-reference manual menuitems | ||
Allowed: | function | ||
Default: | unset | ||
helpitems | Additional popup help items | ||
Allowed: | string vector | ||
Default: | unset | ||
widgetset | Widget set to use | ||
Allowed: | A widgetserver closure tool | ||
Default: | dws |
include 'helpmenu.g' f := frame(); cb := function(whichItem) { print 'help callback called :',whichItem; } r := helpmenu(f, menuitems=['Dish','PGPlotter','Special help'], refmanitems=['Refman:dish','Refman:pgplotter',''], helpitems=['About Dish','AboutPGPlotter', 'Special help'], callback=cb);
When the ``Dish'' button is pressed in this example, the users browser will be directed to the dish entry in the Reference Manual. Similarly, selecting the ``PGPlotter'' button will display the pgplotter entry in the Reference Manual. However, when the ``Special help'' item is selected the cb function will be called and whichItem will have the value ``Special help''.