Class API Reference for Tkinter.
Autogenerated from Python 3.10.1 and Tcl/Tk 8.6.12. [More Info]
Autogenerated from Python 3.10.1 and Tcl/Tk 8.6.12. [More Info]
Tkinter Class API Reference
Tk Application Root, Including Global Methods
- tkinter.Tk - Toplevel widget of Tk which represents mostly the main window of an application. It has an associated Tcl interpreter.
Ttk (Themed) Widgets
- tkinter.ttk.Button - Ttk Button widget, displays a textual label and/or image, and evaluates a command when pressed.
- tkinter.ttk.Checkbutton - Ttk Checkbutton widget which is either in on- or off-state.
- tkinter.ttk.Combobox - Ttk Combobox widget combines a text field with a pop-down list of values.
- tkinter.ttk.Entry - Ttk Entry widget displays a one-line text string and allows that string to be edited by the user.
- tkinter.ttk.Frame - Ttk Frame widget is a container, used to group other widgets together.
- tkinter.ttk.Label - Ttk Label widget displays a textual label and/or image.
- tkinter.ttk.LabeledScale - A Ttk Scale widget with a Ttk Label widget indicating its current value. The Ttk Scale can be accessed through instance.scale, and Ttk Label can be accessed through instance.label
- tkinter.ttk.Labelframe - Ttk Labelframe widget is a container used to group other widgets together. It has an optional label, which may be a plain text string or another widget.
- tkinter.ttk.Menubutton - Ttk Menubutton widget displays a textual label and/or image, and displays a menu when pressed.
- tkinter.ttk.Notebook - Ttk Notebook widget manages a collection of windows and displays a single one at a time.
- tkinter.ttk.OptionMenu - Themed OptionMenu, based after tkinter's OptionMenu, which allows the user to select a value from a menu.
- tkinter.ttk.Panedwindow - Ttk Panedwindow widget displays a number of subwindows, stacked either vertically or horizontally.
- tkinter.ttk.Progressbar - Ttk Progressbar widget shows the status of a long-running operation.
- tkinter.ttk.Radiobutton - Ttk Radiobutton widgets are used in groups to show or change a set of mutually-exclusive options.
- tkinter.ttk.Scale - Ttk Scale widget is typically used to control the numeric value of a linked variable that varies uniformly over some range.
- tkinter.ttk.Scrollbar - Ttk Scrollbar controls the viewport of a scrollable widget.
- tkinter.ttk.Separator - Ttk Separator widget displays a horizontal or vertical separator bar.
- tkinter.ttk.Sizegrip - Ttk Sizegrip allows the user to resize the containing toplevel window by pressing and dragging the grip.
- tkinter.ttk.Spinbox - Ttk Spinbox is an Entry with increment and decrement arrows It is commonly used for number entry or to select from a list of string values.
- tkinter.ttk.Treeview - Ttk Treeview widget displays a hierarchical collection of items.
Classic Widgets with No Themed Counterpart
- tkinter.Canvas - Canvas widget to display graphical elements like lines or text.
- tkinter.Listbox - Listbox widget which can display a list of strings.
- tkinter.Menu - Menu widget which allows displaying menu bars, pull-down menus and pop-up menus.
- tkinter.Text - Text widget which can display text in various forms.
- tkinter.Toplevel - Toplevel widget, e.g. for dialogs.
Classic Widgets Where a Themed Replacement is Available
- tkinter.Button - Button widget.
- tkinter.Checkbutton - Checkbutton widget which is either in on- or off-state.
- tkinter.Entry - Entry widget which allows displaying simple text.
- tkinter.Frame - Frame widget which may contain other widgets and can have a 3D border.
- tkinter.Label - Label widget which can display text and bitmaps.
- tkinter.LabelFrame - labelframe widget.
- tkinter.Menubutton - Menubutton widget, obsolete since Tk8.0.
- tkinter.Message - Message widget to display multiline text. Obsolete since Label does it too.
- tkinter.OptionMenu - OptionMenu which allows the user to select a value from a menu.
- tkinter.PanedWindow - panedwindow widget.
- tkinter.Radiobutton - Radiobutton widget which shows only one of several buttons in on-state.
- tkinter.Scale - Scale widget which can display a numerical scale.
- tkinter.Scrollbar - Scrollbar widget which displays a slider at a certain position.
- tkinter.Spinbox - spinbox widget.
Variables
- tkinter.Variable - Class to define value holders for e.g. buttons. Subclasses StringVar, IntVar, DoubleVar, BooleanVar are specializations that constrain the type of the value returned from get().
- tkinter.BooleanVar - Value holder for boolean variables.
- tkinter.DoubleVar - Value holder for float variables.
- tkinter.IntVar - Value holder for integer variables.
- tkinter.StringVar - Value holder for strings variables.
Images
- tkinter.BitmapImage - Widget which can display images in XBM format.
- tkinter.PhotoImage - Widget which can display images in PGM, PPM, GIF, PNG format.
Dialogs
- tkinter.filedialog.Directory - Ask for a directory
- tkinter.filedialog.Open - Ask for a filename to open
- tkinter.filedialog.SaveAs - Ask for a filename to save as
- tkinter.colorchooser.Chooser - Create a dialog for the tk_chooseColor command.
Other
- tkinter.ttk.Style - Manipulate style database.
- tkinter.font.Font - Represents a named font.