Dev Prakash Sharma has Published 548 Articles

How to speed up scrolling responsiveness when displaying lots of text in Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 06-Mar-2021 08:41:55

874 Views

Tkinter can also be used to render the text file and load it on the canvas. Further, the text files can be used for other purposes like manipulating the data, grabbing the data, and rendering the data for other uses.Let us suppose that we have to read a text in ... Read More

How to Set a Tkinter Window with a Constant Size?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 06-Mar-2021 08:40:00

6K+ Views

Sometimes, the tkinter frame gets resized automatically according to the size of the widgets. To make the frame constant in size, we have to stop the widgets to resize the frame. So there are three methods, Boolean pack_propagate(True/False) method prevents the resizing of the frame from the widget.resizable(x, y) method ... Read More

How to remove text from a label in Python?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 06-Mar-2021 08:36:08

3K+ Views

Tkinter is a Python library that is used for creating and developing GUI-based applications. In this article, we will see how to remove text from a Label that will have some text in it.To remove text from a label, we will create an associated button that will act as a ... Read More

How to remove multiple selected items in the listbox in Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 06-Mar-2021 08:34:07

764 Views

Let us consider that we have created a listbox using the Listbox method in Tkinter and we want to remove multiple selected items from this list.In order to select the multiple list from the Listbox, we will use selectmode as MULTIPLE. Now iterating over the list, we can perform the ... Read More

How to remove empty tags using BeautifulSoup in Python?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 06-Mar-2021 08:31:46

871 Views

BeautifulSoup is a python library that pulls out the data from HTML and XML files. Using BeautifulSoup, we can also remove the empty tags present in HTML or XML documents and further convert the given data into human readable files.First, we will install BeautifulSoup library in our local environment using ... Read More

How to open External Programs using Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 06-Mar-2021 08:28:02

560 Views

Sometimes, while creating an application, we need to interact with external programs and applications. In order to interact with the system's applications and programs, we have to use os Module in python.In this article, we will see how we can interact with external programs and open files using the OS ... Read More

How to make the Tkinter text widget read only?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 06-Mar-2021 08:23:27

8K+ Views

In Tkinter, sometimes, we may want to make a text widget disabled. To achieve this, we can set the text configuration as DISABLED. This will freeze the text widget and will make it read-only.In this example, we will create a text widget and a button which will allow users to ... Read More

How to get the Tkinter widget's current x and y coordinates?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 06-Mar-2021 08:21:22

10K+ Views

Tkinter is widely used to create GUI based applications. It has many toolkits and functions or modules available which can be used to define the different attributes of a particular application. For building GUI applications it provides some widgets including buttons, text boxes and labels. We can customize the position ... Read More

How to Print Hard Copy using Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 06-Mar-2021 08:15:50

901 Views

Tkinter allows developers to interact with the files inside the local system. In this article, we will see how to print a hardcopy of a file using Tkinter packages such as filedialog and win32api module.In order to import these packages, we have to first install these modules in our environment. ... Read More

How to generate Tkinter Buttons dynamically?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 04-Mar-2021 14:11:15

2K+ Views

In this article, we will see how to create buttons dynamically in a tkinter window. Creating buttons dynamically means customizing the buttons and their functionality by adding events to them.First, we will import the tkinter library in the notebook, then we will create an instance using the Button function which ... Read More

Advertisements