Command reference
Each Tk command of ztk has a page: its synopsis, its options with their defaults, its widget commands, examples that run, its errors, and how it differs from Tk 8.6. The guide pages of Widgets show the widgets in use, and each one links to the pages of its commands.
Type a part of a name in the field to find a command.
No command matches.
Widgets
buttonMakes a push button: a widget with a text or an image that runs a script when the user clicks it.canvasMakes a canvas: an area for shapes, text, images, and widgets that a script draws and moves.checkbuttonMakes a checkbutton: a button with an indicator that the user turns on and off.entryMakes an entry: a widget that edits one line of text.frameMakes a frame: an empty widget that holds and groups other widgets.labelMakes a label: a widget that shows a text, an image, or both, and runs no script.labelframeMakes a labelframe: a frame with a border and a label in the border.listboxMakes a listbox: a widget that shows a list of text items and lets the user select items.menuMakes a menu: a list of entries that run commands, set variables, or open other menus.menubuttonMakes a menubutton: a button that opens a menu.messageMakes a message: a widget that shows a text of more than one line.panedwindowMakes a panedwindow: a row or a column of panes with sashes that the user drags to change their sizes.radiobuttonMakes a radiobutton: one button of a group in which the user selects one choice.scaleMakes a scale: a slider that selects a number in a range.scrollbarMakes a scrollbar: a bar with a slider that scrolls the view of another widget.spinboxMakes a spinbox: an entry with two arrows that step its value.textMakes a text: a widget that shows and edits text of many lines, with tags, marks, images, and widgets.toplevelMakes a toplevel: a widget with a window of its own on the desktop.
ttk widgets
ttk::buttonMakes a themed push button: a widget with a text or an image that runs a script when the user clicks it.ttk::checkbuttonMakes a themed check button: a box with a text that the user turns on and off.ttk::comboboxMakes a themed combobox: an entry field with a drop-down list of values.ttk::entryMakes a themed entry: a field of one line of text that the user can edit.ttk::frameMakes a themed frame: a container that groups other widgets, with an optional border.ttk::labelMakes a themed label: a widget that shows a text, an image, or both, and runs no script.ttk::labelframeMakes a themed labelframe: a frame with a border and a title.ttk::menubuttonMakes a themed menubutton: a button that opens a menu.ttk::notebookMakes a themed notebook: a row of tabs over an area that shows one page at a time.ttk::panedwindowMakes a themed paned window: panes in a row or a column, with sashes that the user drags to resize them.ttk::progressbarMakes a themed progress bar: a bar that shows how much of a task is done, or that a task runs.ttk::radiobuttonMakes a themed radio button: one button of a group that shares a variable, with one button on at a time.ttk::scaleMakes a themed scale: a slider that the user drags to pick a number in a range.ttk::scrollbarMakes a themed scrollbar: a bar that shows and moves the visible part of another widget.ttk::separatorMakes a themed separator: a thin line between groups of widgets.ttk::sizegripMakes a themed size grip: a handle in the corner of a window that the user drags to resize the window.ttk::spinboxMakes a themed spinbox: an entry field with arrows that step a number or a value of a list.ttk::styleGives and sets the options of the styles and the themes of the themed widgets.ttk::treeviewMakes a themed tree view: a list of items in a tree, with columns of values and a row of headings.
Geometry
Events and focus
bindGives or sets the script that an event of a widget, a class, or another tag runs.bindtagsGives or sets the list of binding tags of a widget, in the order that its events use them.clipboardPuts text on the clipboard and reads it back.eventDefines virtual events, and sends events to widgets from a script.focusGives or sets the widget that gets the keys of the keyboard.grabKeeps the pointer events of the application in one widget and its descendants.selectionGives a selection an owner window and a handler, and reads the data of a selection.tkwaitRuns the event loop until a variable changes, a widget shows, or a widget is destroyed.
Window manager
destroyDeletes widgets, with each of their descendants and their widget commands.lowerMoves a widget below its siblings in the stacking order.raiseMoves a widget above its siblings in the stacking order.winfoGives facts about widgets and the screen: the size, the position, the tree, the class, and the colors.wmGives or sets the properties of a toplevel window: the title, the size, the state, and the hints for the window manager.
Dialogs
tk_chooseColorShows a dialog to choose a color, and gives the color in the form #RRGGBB.tk_chooseDirectoryShows a dialog to choose a folder, and gives its path.tk_getOpenFileShows a dialog to choose a file to open, and gives its path.tk_getSaveFileShows a dialog to choose the name of a file to save, and gives its path.tk_messageBoxShows a message with a set of buttons, waits for the user to click one, and gives its name.tk_popupShows a menu as a popup at a point of the screen.
Images and fonts
Other
bellRings the bell of the display: in ztk, the command checks its options and makes no sound.optionAdds, reads, and clears the entries of the option database, which gives the default options of new widgets.tkGives and sets facts of the app: its name, its scale, its windowing system, and the state of the input.ztk::gameRuns the loop of a 2D game, reads its input as actions, and keeps its random numbers, its fit, and its saves.ztk::photoResizes, crops, turns, and mirrors a photo, and reads the EXIF orientation of an image file.