Modern Tkinter
Class API Reference for Tkinter.
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.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.