Articles on Trending Technologies

Technical articles with clear explanations and examples

How to create a borderless fullscreen application using Python-3 Tkinter?

Dev Prakash Sharma
Dev Prakash Sharma
Updated on 25-Mar-2026 3K+ Views

In order to make a Tkinter window borderless and full-screen, we can use the utility method attributes('-fullscreen', True). Tkinter windows can be configured using functions and methods defined in the Tkinter library. Another similar method Tkinter provides to make the application window full-screen is overrideredirect(True). This method can be invoked only if the application needs to resize in its defined width and height only. Method 1: Using attributes('-fullscreen', True) The attributes('-fullscreen', True) method creates a true fullscreen window that covers the entire screen including the taskbar ? # Import the required Libraries from tkinter import ...

Read More

How to convert PDF files to Excel files using Python?

Dev Prakash Sharma
Dev Prakash Sharma
Updated on 25-Mar-2026 36K+ Views

Python provides several libraries for handling file conversions. In this article, we'll learn how to convert PDF files to Excel format using the tabula-py module. The tabula-py library is built on Java technology and can extract tabular data from PDF documents and convert it into pandas DataFrames. Prerequisites Before working with tabula-py, ensure you have Java installed on your system, as the library depends on Java for PDF processing. Installation Install the required package using pip − pip install tabula-py Basic Syntax The main functions we'll use are − ...

Read More

How to add an image in Tkinter?

Dev Prakash Sharma
Dev Prakash Sharma
Updated on 25-Mar-2026 4K+ Views

Adding images to Tkinter applications enhances the user interface and provides visual appeal. You can display images using PIL (Pillow) library with PhotoImage and Label widgets. Basic Image Display Here's a simple example that displays a fixed image in a Tkinter window ? import tkinter as tk from PIL import Image, ImageTk # Create main window root = tk.Tk() root.title("Image Display") root.geometry("400x300") # Load and display image try: # Load image using PIL img = Image.open("sample.jpg") # ...

Read More

How do you check if a widget has a focus in Tkinter?

Dev Prakash Sharma
Dev Prakash Sharma
Updated on 25-Mar-2026 4K+ Views

In Tkinter, you can check if a widget has focus using the focus_get() method. This method returns the widget object that currently has focus, allowing you to compare it with your target widget to determine if it's focused. Using focus_get() Method The focus_get() method is called on the root window and returns the currently focused widget object. You can compare this returned object with your widget to check if it has focus ? import tkinter as tk # Create main window root = tk.Tk() root.geometry("400x300") root.title("Focus Check Example") # Create widgets entry1 = tk.Entry(root, ...

Read More

How do I get an event callback when a Tkinter Entry widget is modified?

Dev Prakash Sharma
Dev Prakash Sharma
Updated on 25-Mar-2026 9K+ Views

Callback functions in Tkinter are used to handle specific events in widgets. You can add an event callback function to an Entry widget that triggers whenever the widget's content is modified. This is accomplished by creating a Tkinter variable (like StringVar) and using its trace() method to monitor changes. Basic Entry Widget Callback Here's how to create a callback that responds to Entry widget modifications − import tkinter as tk def callback(var): content = var.get() print(f"Entry modified: {content}") # Create main window win = tk.Tk() win.geometry("400x200") ...

Read More

How to change the font on ttk.Entry in Tkinter?

Dev Prakash Sharma
Dev Prakash Sharma
Updated on 25-Mar-2026 3K+ Views

There are times when a user wants to insert information like Name, contact number, Email, address, etc. Tkinter has a simple way to handle these types of inputs through its Entry widgets. Tkinter Entry widgets can be styled using the ttk package. To change other properties of the Entry widgets such as font properties, text-size, and font-style, we can use the font('font-family font-size font-style') attribute. We can specify the font property in the entry constructor. Basic Example Here's how to create a ttk.Entry with custom font properties ? # Import tkinter library from tkinter import ...

Read More

How can I resize the root window in Tkinter?

Dev Prakash Sharma
Dev Prakash Sharma
Updated on 25-Mar-2026 4K+ Views

In this example, we will see how to resize a tkinter window using the geometry manager. Tkinter geometry manager is generally used to configure the width and height of a tkinter window. The geometry(width x height) method takes width and height as parameters and resizes the window accordingly. We can also define the position of the tkinter window by adding geometry("width x height+X+Y") where X and Y are horizontal and vertical positions of the window. Basic Window Resizing Here's how to create and resize a tkinter window ? # Import tkinter library from tkinter import ...

Read More

Get the text of a button widget in Tkinter

Dev Prakash Sharma
Dev Prakash Sharma
Updated on 25-Mar-2026 14K+ Views

When building Tkinter applications, you may need to retrieve the text content of a button widget dynamically. The cget() method allows you to get configuration values from any Tkinter widget, including button text. Syntax The basic syntax to get button text is − button_text = button.cget('text') Example Let's create a button and retrieve its text to display in a label widget − # Import tkinter library from tkinter import * from tkinter import ttk # Create an instance of tkinter frame or window win = Tk() # Set the ...

Read More

Get Application Version using Python

Dev Prakash Sharma
Dev Prakash Sharma
Updated on 25-Mar-2026 2K+ Views

In software development, whenever developers add new features or fix bugs in an application, they assign it a new version number. This helps users identify the latest updates and features available in that application. Using Python, we can retrieve the version of any application installed on Windows systems. We'll use the pywin32 library to interact with executable files through the Win32 API, which provides access to Windows system information. Installation First, install the required package ? pip install pywin32 Getting Application Version Here's how to retrieve the version number of any Windows ...

Read More

Extract hyperlinks from PDF in Python

SaiKrishna Tavva
SaiKrishna Tavva
Updated on 25-Mar-2026 5K+ Views

To extract hyperlinks from PDF in Python can be done using several libraries like PyPDF2, PDFminer, and pdfx. Each offers different approaches and capabilities for extracting URLs from PDF documents. PyPDF2: A Python built-in library that acts as a PDF toolkit, allowing us to read and manipulate PDF files. PDFMiner: A tool used for extracting information from PDF documents, focusing on getting and analyzing text data. ...

Read More
Showing 4871–4880 of 61,299 articles
« Prev 1 486 487 488 489 490 6130 Next »
Advertisements