Dev Prakash Sharma has Published 556 Articles

How to Use Images as Backgrounds in Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

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

7K+ Views

If we will create an instance of Tkinter frame and display the window while keep running it, then it will show the default output canvas. However, we can add an image inside the Tkinter canvas as a background using PhotoImage methods and Canvas methods.Since image support in Tkinter is limited ... Read More

How to use Bitmap images in Button in Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 06-Mar-2021 08:45:10

727 Views

In Tkinter, we can create and customize buttons using images. These images can be uploaded by using the Python PhotoImage(file) function.However, PhotoImage() supports only a few image types such as PNG, PPM, and GIF. In addition, we can create buttons using BitMap images too. A bitmap image is nothing but ... Read More

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

570 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

4K+ 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

2K+ 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

511 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

697 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

420 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

7K+ 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

7K+ 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

Advertisements