Introduction to the Tkinter Spinbox widget A Spinbox widget allows you to select a value from a set of values. The values can be a range of numbers. A Spinbox has an area for showing the current value and a pair of arrowheads. When you click the upward-pointing arrowhead, theContinue Reading

Introduction to Tkinter slider widget A slider allows you to enter a value by moving an indicator. A slider can be vertical or horizontal: To create a slider, you’ll use the ttk.Scale() constructor as follows: ttk.Scale(container,from_,to)Code language: Python (python) In this syntax, the container specifies the parent component of the slider. The from_ and to options specify theContinue Reading

Introduction to the Tkinter PanedWindow widget The PaneWindow widget divides the space of a frame or a window. A PaneWindow is like a Frame that acts as a container for holding child widgets Typically, a PanedWindow contains a vertical or horizontal stack of child widgets: A PanedWindow uses a bar to separate the child widgets. This bar is called a sash. A sash can have a handle whichContinue Reading

Introduction to the Tkinter Listbox A Listbox widget displays a list of single-line text items. A Listbox allows you to browse through the items and select one or multiple items at once. To create a Listbox, you use the tk.Listbox class like this: listbox = tk.Listbox(container, listvariable, height)Code language: Python (python) InContinue Reading

Introduction to the Tkinter Combobox widget A combobox is a combination of an Entry widget and a Listbox widget. A combobox widget allows you to select one value in a set of values. In addition, it allows you to enter a custom value. Create a combobox To create a combobox widget, you’ll use the ttk.Combobox() constructor.Continue Reading

Introduction to Tkinter radio buttons Radio buttons allow you to select between one of a number of mutually exclusive choices. Typically, you use radio buttons together in a set. They’re a good option if you have a few choices that you want users to select. To create radio buttons, youContinue Reading

Introduction to the Tkinter checkbox widget A checkbox is a widget that allows you to check and uncheck. A checkbox can hold a value and invoke a callback when it’s checked or unchecked. Typically, you use a checkbox when you want to ask users to choose between two values. ToContinue Reading

Introduction to the Tkinter Separator widget A separator widget places a thin horizontal or vertical rule between groups of widgets. To create a separator widget, you use the ttk.Separator constructor like this: sep = ttk.Separator(container,orient=’horizontal’)Code language: JavaScript (javascript) The orient option can be either ‘horizontal’ or ‘vertical’. The following example illustrates how to use a separator widget toContinue Reading

Introduction to the Tkinter ScrolledText widget So far, you’ve learned how to create a Text widget and how to link a vertical Scrollbar to the text widget. To make it more convenient, Tkinter provides you with the ScrolledText widget which does the same things as a text widget linked to a vertical scroll bar. To useContinue Reading

Introduction to the Tkinter scrollbar widget A scrollbar allows you to view all parts of another widget whose content is typically larger than the available space. Tkinter scrollbar widget is not a part of any other widgets such as Text and Listbox. Instead, a scrollbar is an independent widget. To use the scrollbarContinue Reading