- 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 310 Articles for GUI-Programming
1K+ Views
A widget in a Tkinter application can be configured easily by adding extensions and properties to it. The Text widget in tkinter is used to accept multiline user input. We can make the text inside the Text widget Scrollable by adding a scrollbar to it.The ScrolledText Widget is also available in Tkinter Library. It is the combination of Text widget and Scrollbar widget which provides features like scrolling the text in an application. In order to use ScrolledText widget in an application, you must import it first. The scrolledtext widget works similar to the standardText widget. It includes all the ... Read More
13K+ Views
Tkinter Label widgets are created by defining the Label(parent, **options) constructor in the program. We use the Label widget to display Text or Images in any application. If we want to display a text, we have to assign a value to the text attribute in the constructor. You can also add multiple lines of text in the label widget by using next line attribute. It will separate the current text to the next line in the Label widget.Example# Import the tkinter library from tkinter import * # Create an instance of tkinter frame win= Tk() # Set ... Read More
2K+ Views
Tkinter has many inbuilt functions and modules which are already implemented in Python. The MessageBox module in Tkinter is one of them that can be used in any application, just by using its associated function. The only limitation with these packages is that we cannot modify or change the MessageBox template. Hence, to implement a Custom Popup MessageBox, we can follow these steps, Create a Button and add a command to define a function to it.Define a function to create a Toplevel window and add other widgets to it.Add Buttons and confirmation Label Text in the Toplevel window.Add the Button ... Read More
3K+ Views
You can set the position of a text widget by specifying its dimension using place(**option) geometry manager. Instantiating a widget inside a frame makes the widget independent throughout the application window. We then use the place()geometry manager to assign the width and height of the widget inside the window. The pixels justify how accurately a widget is positioned in the window. Thus, the place() geometry manager provides a grid system where we can place any widget in a particular location.Example# Import required libraries from tkinter import * from tkinter import ttk from lorem_text import lorem # Create an instance ... Read More
1K+ Views
Python Matplotlib library is helpful in many applications for visualizing the given data and information in terms of graphs and plots. It is possible to run matplotlib in a Tkinter application. Generally, importing any Python library explicitly in an application gives access to all its functions and modules in the library.To create a GUI application that uses matplotlib and its functions, we have to import the library using the command from matplotlib.pyplot as plt. However, we also use Tkagg in the backend that uses the Tkinter user interface interactively.ExampleIn this example, we have imported Tkagg and matplotlib to visualize the ... Read More
821 Views
Python Tkinter is a standard library that is used to develop GUI-based featured and functional applications. Whenever we execute our application, it displays a general window that contains some widgets and a title bar in it. The mainloop() method is responsible for executing the script and displaying the output window. However, mainloop() implies that it doesn't terminate automatically until the user remains in the window. Whenever the user terminates the program, it gets closed automatically. The mainloop() method gets called whenever the program starts executing.Example# Import the required libraries from tkinter import * # Create an instance of tkinter ... Read More
351 Views
Tkinter provides Text widget to input data in a text field. It can accept multiline user input. Tkinter includes many inbuilt properties and features that can be used to improve the look and feel of the context. The text written in Text widget can be wrapped with wrap property. The wrap allows users to simplify the text editor by wrapping the context in words, characters or None. It fixes the indentation of the text inside the Text Editor.ExampleIn this example, we will wrap the sentences by words which means each word gets selected automatically without following the same line.# Import ... Read More
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
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
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