Python Tkinter Widgets
In this tutorial, we will cover an overview of Tkinter widgets in Python. These widgets are the functional units on any Tkinter GUI application.
There are various controls, such as buttons, labels, scrollbars, radio buttons, and text boxes used in a GUI application. These little components or controls of Graphical User Interface (GUI) are known as widgets in Tkinter.
These are 19 widgets available in Python Tkinter module. Below we have all the widgets listed down with a basic description:
|Name of Widget
||If you want to add a button in your application then Button widget will be used.
||To draw a complex layout and pictures (like graphics, text, etc.)Canvas Widget will be used.
||If you want to display a number of options as checkboxes then Checkbutton widget is used. It allows you to select multiple options at a time.
||To display a single-line text field that accepts values from the user Entry widget will be used.
||In order to group and organize another widgets Frame widget will be used. Basically it acts as a container that holds other widgets.
||To Provide a single line caption to another widget Label widget will be used. It can contain images too.
||To provide a user with a list of options the Listbox widget will be used.
||To provides commands to the user Menu widget will be used. Basically these commands are inside the Menubutton. This widget mainly creates all kinds of Menus required in the application.
||The Menubutton widget is used to display the menu items to the user.
||The message widget mainly displays a message box to the user. Basically it is a multi-line text which is non-editable.
||If you want the number of options to be displayed as radio buttons then the Radiobutton widget will be used. You can select one at a time.
||Scale widget is mainly a graphical slider that allows you to select values from the scale.
||To scroll the window up and down the scrollbar widget in python will be used.
||The text widget mainly provides a multi-line text field to the user where users and enter or edit the text and it is different from Entry.
||The Toplevel widget is mainly used to provide us with a separate window container
||The SpinBox acts as an entry to the "Entry widget" in which value can be input just by selecting a fixed value of numbers.
||The PanedWindow is also a container widget that is mainly used to handle different panes. Panes arranged inside it can either Horizontal or vertical
||The LabelFrame widget is also a container widget used to mainly handle the complex widgets.
||The MessageBox widget is mainly used to display messages in the Desktop applications.
Using all the above-mentioned Widgets, we can create amazing GUI applications.
So in this tutorial, we got a basic introduction to Trinket Widgets. In our upcoming tutorial pages, we will cover each widget in detail with their respective code examples.