-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Tcl/Tk 8.5 Programming Cookbook
In Tk the menu is not just a name for a part of your GUI, but also the actual widget command name as well. The menu command will create a new menu widget.
The syntax is as follows:
menu name option value…
The menu command accepts one or more option value pairs, as detailed in the following table:
|
Option |
Interpretation |
|---|---|
|
|
Specifies an accelerator or keyboard hotkeys to be displayed to the right-hand side of the menu text. The specific acceptable values are dependent on the display manager in use. For example, in a Windows application, Control+N would be an acceptable value. |
|
|
Specifies the background color to be used when drawing the element. The active background is the color used when the mouse is over the element and when pressing the mouse button will initiate an action. |
|
|
Specifies the width of the 3D border to draw around the active item. |
|
|
Specifies the foreground color to be used when drawing... |
Change the font size
Change margin width
Change background colour