Summary of the Tk Commands
The following tables list the Tcl commands added by Tk. The page number in the table is the primary reference for the command, and there are other references in the index.
Widget Commands
Table 23-1 lists commands that create widgets. There are 18 different widgets in Tk, although 4 of them are variations on a button, and 5 are devoted to different flavors of text display.
Table 23-1. Tk widget-creation commands|
button | 454 | Create a command button. | canvas | 557 | Create a canvas, which supports lines, boxes, bitmaps, images, arcs, text, polygons, and embedded widgets. | checkbutton | 458 | Create a toggle button that is linked to a Tcl variable. | entry | 507 | Create a one-line text entry widget. | frame | 485 | Create a container widget used with geometry managers. | label | 490 | Create a read-only, multiline text label. | labelframe | 485 | Create a container widget used with geometry managers that has extra label attributes. (Tk 8.4) | listbox | 519 | Create a line-oriented, scrolling text widget. | menu | 462 | Create a menu. | menubutton | 462 | Create a button that posts a menu. | message | 493 | Create a read-only, multiline text message. | panedwindow | 429 | Create a container widget that controls other widgets in a paned fashion. (Tk 8.4) | radiobutton | 458 | Create one of a set of radio buttons linked to one variable. | scale | 495 | Create a scale widget that adjusts the value of a variable. | scrollbar | 499 | Create a scrollbar that can be linked to another widget. | spinbox | 511 | Create a spinbox widget that is a composite entry widget with button controls for adjusting the value. (Tk 8.4) | text | 531 | Create a general-purpose, editable text widget. | toplevel | 485 | Create a frame that is a new top level window. |
Widget Manipulation Commands
Table 23-2 lists commands that manipulate widgets and provide associated functions like input focus, event binding, and geometry management.
Table 23-2. Tk widget-manipulation commands|
bell | 497 | Ring the terminal bell device. | bind | 435 | Bind a Tcl command to an event. | bindtags | 437 | Create binding classes and control binding inheritance. | clipboard | 594 | Manipulate the clipboard. | destroy | 605 | Delete a widget. | event | 446 | Define and generate virtual events. | focus | 603 | Control the input focus. | font | 641 | Set and query font attributes and measurements. | grab | 604 | Steal the input focus from other widgets. | grid | 419 | Arrange widgets into a grid with constraints. | image | 626 | Create and manipulate images. | lower | 409 | Lower a window in the stacking order. | option | 477 | Set and query the resources database. | pack | 409 | Pack a widget in the display with constraints. | place | 427 | Place a widget in the display with positions. | raise | 409 | Raise a window in the stacking order. | selection | 593 | Manipulate the selection. | send | 648 | Send a Tcl command to another Tk application. | tk | 669 | Query or set the application name or global caret. | tkerror | 202 | Handler for background errors. | tkwait | 605 | Wait for an event. | update | 608 | Update the display by going through the event loop. | winfo | 663 | Query window state. | wm | 657 | Interact with the window manager. |
Support Procedures
Table 23-3 lists several support procedures that implement standard dialogs, option menus, and other facilities.
Table 23-3. Tk support procedures|
tk_bisque | 621 | Install bisque family of colors. | tk_chooseColor | 602 | Dialog to select a color. (Tk 4.2) | tk_chooseDirectory | 600 | Dialog to select a directory. (Tk 8.2) | tk_dialog | 599 | Create simple dialogs. | tk_focusFollowsMouse | 603 | Install mouse-tracking focus model. | tk_focusNext | 604 | Focus on next widget in tab order. | tk_focusPrev | 604 | Focus on previous widget in tab order. | tk_getOpenFile | 600 | Dialog to open an existing file. (Tk 4.2) | tk_getSaveFile | 600 | Dialog to open a new file. (Tk 4.2) | tk_messageBox | 600 | Message dialog. (Tk 4.2) | tk_optionMenu | 465 | Create an option menu. | tk_popup | 465 | Create a pop-up menu. | tk_setPalette | 621 | Set the standard color palette. (Tk 4.2) |
|