Menu Help (version of 13 July 1995) OVERVIEW This is a patch to the Tk menu widget so that you can attach Tcl code to execute when a menu entry is entered or left. This can be used to implement one line help messages about the menu entries that appear when the mouse is in the menu entry. REQUIREMENTS This is a patch to the Tk4.0 menu widget. It requires you to modify the tkMenu.c file. Only a few lines are added to tkMenu.c and no lines are changed or deleted. The file tkMenu.c.patches shows the patches. INSTALLATION Copy the tkMenu.c in this directory into the Tk4.0 directory. Then do "make install" again. This creates a new libtk.a and wish which have the modified version of the menu widget. DOCUMENTATION This adds two new options to menu entries. The original options are listed on the menu manual page under the "add" subcommand to a menu. The new options are: -enter value Specifies a Tcl command to execute when the new entry is entered. -leave value Specifies a Tcl command to execute when the new entry is left. EXAMPLE The file "menuHelp.tcl" is an example of how to use these new options. It creates a menu bar with two pulldown menus. There is a one line help message attached to each menu entry. Make the new version of wish, say mwish, and run the example with "mwish menuHelp.tcl". Notice the message lines as you move the mouse through the menus. AUTHOR Charlie Crowley crowley@cs.unm.edu http://www.cs.unm.edu/~crowley 505-265-0133