- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 604 Articles for Tkinter
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
3K+ Views
Tkinter is a well-known Python library for creating GUI-based applications. You can create a fully featured application with the help of widgets, functions, and modules that are already present in Tkinter library.Sometimes, selecting the right GUI of the application becomes a daunting task for many of us. Tkinter comes with a set of inbuilt functions and extensions to create good-looking GUIs.Generally, the Frame widget in Tkinter manages all the widgets in an application as a container. It inherits all the properties that the main window can contain. To design the layout of the widgets, we can use any of the ... Read More
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
9K+ Views
Tkinter Events are generally used to provide an interface that works as a bridge between the User and the application logic. We can use Events in any Tkinter application to make it more interactive and functional. Events like and are used to call a specific function only when a key is pressed or released.ExampleIn this example, we will create a script that will show some message on the screen whenever we press a key. The message gets disappeared when we release the same key.# Import the Required libraries from tkinter import * # Create an instance of ... Read More
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
11K+ Views
Tkinter is a Python library which is used to create GUI-based application. Tkinter comes with many inbuilt features and extensions which can be used to optimize the application performance and behaviour. Tkinter Events are generally used to provide an interface that works as a bridge between the User and the application logic. We can use Events in any Tkinter application to make it operable and functional.Here is a list of some common Tkinter events which are generally used for making the application interactive. − Use the Button event in a handler for binding the Mouse wheels and Buttons. − Instead ... Read More
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
2K+ Views
Tkinter Combobox widget is one of the useful widgets to implement dropdown menus in an application. It uses the combination of the Entry widget and ListBox widget on the top of it. We can select Menu items by typing the item name (if it exists in the Menu List) in the Entry field. However, sometimes, there might be cases when we need to use autocompletion to select the menu items.In order to create an auto-completion Combobox, we will create a Listbox first to list out the menus and an Entry widget to display the selected Menu. You can bind the ... Read More
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
6K+ Views
Tkinter has lots of inbuilt functions and methods that can be used configure the properties of Tkinter widgets. These properties vary with different geometry managers. The grid geometry manager is one of them which deals with many complex layout problems in any application. Grid geometry manager adds all the widgets in the given space (if applicable) without overlapping each other.Let us suppose that we have created a sticky frame using Grid geometry manager and we want to center the Label text widget inside the frame. In this case, we have to first make the main window sticky by configuring the ... Read More
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
7K+ Views
The margin of a tkinter window can be controlled by specifying the value of fill, expand and padding. Another way to set the margin of a tkinter window is to use grid(**options) Geometry Manager. Grid pack manager allows us to add the margin by specifying the value of row and column property.Example# Import the required library from tkinter import * from tkinter import ttk # Create an instance of tkinter frame win= Tk() # Set the size of the Tkinter window win.geometry("700x350") # Add a frame to set the size of the window frame= Frame(win, relief= 'sunken', ... Read More
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
7K+ Views
Label widgets in Tkinter are used to display text and images. We can link a URL with the label widget to make it clickable. Whenever the label widget is clicked, it will open the attached link in the default browser.To work with the browser and hyperlinks we can use webbrowser module in Python. The module is accessible in Python extension library and can be installed by typing the command pip install webbrowser in the shell.ExampleIn this application, we will create a Label which turns out to be a Hyperlink referring to a webpage.# Import the required library from tkinter import ... Read More
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
1K+ Views
Tkinter is a Python library which is used to create GUI-based application. Let us suppose that we have to create a functional application in which a particular function is defined in a loop. The recursive function will display some text in a Label widget for infinite times.To stop this recursive function, we can define a function which changes the condition whenever a button is clicked. The condition can be changed by declaring a global variable which can be either True or False.Example# Import the required library from tkinter import * # Create an instance of tkinter frame win= Tk() ... Read More
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
843 Views
In order to view the widgets on the screen, we have to first associate each and every widget with the geometry manager. There are three ways in which we can view our widgets in the application. The Grid and Pack geometry manager are mostly used in many applications.Pack Geometry ManagerThe Pack geometry manager is one of the simplest geometry managers. We can use Pack manager to provide additional properties to the widgets such as padding, position respect to the X and Y axis, and expand property. It works on the basis of single row and single column. All the properties ... Read More
![Dev Prakash Sharma](https://www.tutorialspoint.com/assets/profiles/302800/profile/60_4750-1612521296.jpg)
2K+ Views
Tkinter Entry widgets accept single-line user input in a text field. We can change the properties of the Entry widget by providing the default attributes and values in its constructor.Let us suppose that we want to create a full-width Entry widget for an application. There are several ways to do that but if we consider the simplest case where we use Pack Geometry Manager to display the Entry widget, then we can definitely set the width of Entry widget by adding fill(x or y) property.Example# Import the required library from tkinter import * from tkinter import ttk # Create ... Read More