Tkinter Articles

Page 9 of 46

Message Encode-Decode using Python Tkinter

Dr Ruqaiya Khanam
Dr Ruqaiya Khanam
Updated on 27-Mar-2026 549 Views

In this article, we'll learn how to create a message encoder-decoder application using Python Tkinter. Users can enter a message and select whether to encode or decode it. The encoded or decoded message will be displayed in the GUI window after clicking the respective button. What is Message Encoding? Message encoding transforms text into a different format. In our simple example, we'll use string reversal as our encoding method − reversing the character order makes text unreadable while keeping it easily decodable. Setting Up the GUI Application Let's create the Tkinter application step by step ? ...

Read More

iconphoto() method in Tkinter - Python

Rohan Singh
Rohan Singh
Updated on 27-Mar-2026 2K+ Views

Tkinter is a Python library used for creating graphical user interfaces (GUIs). The iconphoto() method allows you to set custom icons for your Tkinter application window, enhancing visual appeal and creating a professional branded experience. Understanding the iconphoto() Method The iconphoto() method sets custom icons for Tkinter windows. The icon appears in the title bar, taskbar, and Alt+Tab menu. This method accepts image objects as parameters and applies them as window icons. Syntax root.iconphoto(default, *args) Parameters default: Boolean value − True sets icon for both window and application, False sets only ...

Read More

Weight Conversion GUI using Tkinter

Priya Sharma
Priya Sharma
Updated on 27-Mar-2026 580 Views

Graphical User Interfaces (GUIs) are an integral part of modern software applications, providing an interactive and user-friendly experience. In this tutorial, we will explore how to create a Weight Conversion GUI using Tkinter, a popular Python library for creating GUI applications. Our Weight Conversion GUI will allow users to easily convert weights between different units such as kilograms (kg), pounds (lb), and ounces (oz). Importing Required Modules We'll begin by importing the necessary modules. Tkinter provides the core functionality for building GUIs − import tkinter as tk from tkinter import ttk Here, we ...

Read More

Treeview Scrollbar in Python-Tkinter

Priya Sharma
Priya Sharma
Updated on 27-Mar-2026 6K+ Views

When working with hierarchical data in graphical user interfaces (GUIs), it's often necessary to display the data in a structured and organized manner. The Treeview widget in Python-Tkinter provides a powerful solution for presenting hierarchical data in a user-friendly way. However, as the number of items in the Treeview grows, it becomes crucial to include a scrollbar to ensure smooth navigation and usability. First, ensure that you have Python and Tkinter installed on your system. Python 3 is recommended for compatibility and improved features. Note that Tkinter comes pre-installed with Python, so no additional installation is typically needed. ...

Read More

Age Calculator using Python Tkinter

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 27-Mar-2026 2K+ Views

An age calculator in Python using Tkinter is a GUI (Graphical User Interface) application that allows users to determine their age based on their date of birth (DOB). To design the user interface of this application, we use various methods provided by the Tkinter library such as Tk(), pack(), Entry(), Button(), and more. GUI of Age Calculator Let us build a GUI-based age calculator where the user can enter their date of birth in the format of YYYY-MM-DD. The application will calculate and display the age in years, months, and days. ...

Read More

How to change Tkinter Window Icon

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 27-Mar-2026 17K+ Views

Tkinter is a popular GUI (Graphical User Interface) library in Python that provides a simple way to create desktop applications. You can customize the window icon using built−in functions like Tk(), PhotoImage(), and iconphoto(). Key Methods for Changing Window Icons Tk() Creates the main window of the tkinter application ? root = Tk() PhotoImage() A class that loads and displays images. The file parameter specifies the image location ? img = PhotoImage(file='image_path.png') iconphoto() Sets the window icon using a PhotoImage object. Takes two parameters: a boolean and the image variable ...

Read More

Light or Dark Theme Changer using Tkinter

Siva Sai
Siva Sai
Updated on 27-Mar-2026 3K+ Views

A GUI (Graphical User Interface) that smoothly alternates between light and dark themes can greatly enhance user experience. Tkinter, Python's built-in GUI library, makes it easy to create such applications. This tutorial will show you how to build a theme changer using Tkinter. What is Tkinter? Tkinter is Python's standard GUI library included with every Python installation. It provides a simple yet powerful way to create desktop applications with widgets like buttons, labels, text boxes, and menus that can be customized with different colors and styles. Importance of Theme Changing Feature Theme switching improves user experience ...

Read More

How to set the tab size in Text widget in Tkinter?

Tapas Kumar Ghosh
Tapas Kumar Ghosh
Updated on 27-Mar-2026 1K+ Views

The Python Tkinter module provides a powerful way to create graphical user interfaces (GUIs). The Text widget is particularly useful for multi-line text input, and you can customize its tab size using the tabs parameter to improve text formatting and readability. Setting Tab Size in Text Widget The tabs parameter in the Text widget accepts a tuple or list of tab stop positions measured in pixels or other units ? import tkinter as tk # Create main window root = tk.Tk() root.title("Text Widget Tab Size") root.geometry("600x400") # Create Text widget with custom tab size ...

Read More

Language Detection in Python using Tkinter

Siva Sai
Siva Sai
Updated on 27-Mar-2026 595 Views

Language detection is a crucial feature in today's globalized applications. This tutorial demonstrates how to build a language detection GUI application using Python's Tkinter library combined with the langdetect package. We'll create a user-friendly interface that identifies the language of user-inputted text. What is Tkinter? Tkinter is Python's standard GUI toolkit interface for the Tk windowing system. It's the most commonly used method for creating graphical user interfaces in Python and supports most Unix, Windows, and Macintosh platforms with a powerful, platform-independent windowing toolkit. The Importance of Language Detection Language detection determines the language in which ...

Read More

How to stop event propagation in Python Tkinter?

Kiran Kumar Panigrahi
Kiran Kumar Panigrahi
Updated on 27-Mar-2026 1K+ Views

Tkinter events are very powerful in handling different objects and widgets in an application. When multiple widgets overlap or are nested, event propagation can cause unintended behavior where clicking one element triggers events for multiple elements. Understanding how to control event propagation is crucial for building responsive GUI applications. In this tutorial, we'll explore how to stop event propagation in Python Tkinter using practical examples with canvas widgets and shape objects. Understanding Event Propagation Event propagation occurs when an event triggered on a child widget also gets passed to its parent widget. For example, clicking a shape ...

Read More
Showing 81–90 of 459 articles
« Prev 1 7 8 9 10 11 46 Next »
Advertisements