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

Introduction to Tkinter Text widget The Text widget allows you to display and edit multi-line textarea with various styles. Besides the plain text, the Text widget supports embedded images and links. To create a text widget, you use the following syntax: In this syntax: Note that the Text widget is only available in the Tkinter module,Continue Reading

Introduction to Tkinter Frame A frame is a widget that displays as a simple rectangle. Typically, you use a frame to organize other widgets both visually and at the coding level. To create a frame, you use the ttk.Frame class: frame = ttk.Frame(container, **options)Code language: Python (python) A frame has various configuration objects whichContinue Reading

Introduction to Tkinter place geometry manager The Tkinter place geometry manager allows you to precisely position widgets within its container using the (x, y) coordinate system. To access the place geometry manager, you use the place() method on all the standard widgets like this: widget.place(**options)Code language: CSS (css) Absolute and relative positions The place geometry manager provides youContinue Reading

Introduction to the Tkinter grid geometry manager The grid geometry manager uses the concepts of rows and columns to arrange the widgets. The following shows a grid that consists of four rows and three columns: Each row and column in the grid is identified by an index. By default, the firstContinue Reading