LablTk: menus

A menu showing three options
Pressing the menu button, you will be presented a list of options,
bound to actions via the command arguments.
Note the separation line above the "Exit" button which
you see when you press "Weather".


               

It is also possible to bind the setting of a value through pressing the buttons of an Optionmenu as shown in the following example:

A menu proposing several options to set a value
In this example, the Textvariable mychoice is initially set to "?".




              


By clicking on one of the buttons of the menu, mychoice is set
to the appropriate value (as shown on the right)
which is displayed when leaving through the Quit button.



                



François Thomasset -- INRIA, Rocquencourt -- November 2007
Email: Francois dot Thomasset at inria dot fr