Dev Prakash Sharma has Published 548 Articles

Convert Images to PDFs using Tkinter

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 21-Apr-2021 07:33:13

606 Views

Python is a scripting language and thus, it helps in many ways to create file converters such as CSV to PDF, PDF to DOC, and vice-versa. With the help of certain libraries, we can also create an application that converts images into PDF. To create such an application, we use ... Read More

Changing ttk Button Height in Python

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 21-Apr-2021 07:32:52

3K+ Views

Ttk adds styles to the tkinter’s standard widget which can be configured through different properties and functions. We can change the height of the ttk button by using the grid(options) method. This method contains various attributes and properties with some different options. If we want to resize the ttk button, ... Read More

When and how to use pack or grid layouts in tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 16-Apr-2021 07:25:26

2K+ Views

Tkinter Pack geometry manager is the bounding box for all the widgets. It helps the parent widget to hold and display all the containing widgets in it. It is easy to use and we can display any widgets by using the pack() method. Additionally, pack manager has several other properties ... Read More

What does 'weight' do in tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 16-Apr-2021 07:23:57

2K+ Views

In order to structure the layout of the widgets in an application, we generally use the tkinter grid system. A grid system comprises rows and columns in which widgets are aligned. If we want to configure any widgets, then we can use the grid row and columns properties.Consider, if a ... Read More

Update Tkinter Label from variable

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 16-Apr-2021 07:22:47

5K+ Views

To display the text and images in an application window, we generally use the Tkinter Label widget. In this example, we will update the Label information by defining a variable. Whenever the information stored in the variable changes, it will update the Label as well. We can change the Label ... Read More

Underline Text in Tkinter Label widget

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 16-Apr-2021 07:21:09

6K+ Views

Tkinter label widgets can be styled using the predefined attributes and functions in the library. Labels are useful in place of adding text and displaying images in the application. Sometimes, we need to style the font property of Label Text such as fontfamily, font-style (Bold, strike, underline, etc.), font-size, and ... Read More

Tkinter scrollbar for frame

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 16-Apr-2021 07:19:55

18K+ Views

Let’s suppose you want to organize a set of widgets inside an application window, then you can use Frames. Tkinter Frames are generally used to organize and group many widgets. For a particular application, we can also add a scrollbar in the frames. In order to add a scrollbar, we ... Read More

Setting the focus to a specific Tkinter entry widget

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 16-Apr-2021 07:18:08

2K+ Views

Tkinter has many universal methods that add functionalities to widgets and elements. In order to set the focus to a particular widget, we have the focus_set() method which is used to focus a specific widget in a group of widgets present in an application.ExampleIn this example, we have created numeric ... Read More

Select all text in a Text widget using Python 3 with tkinter

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 16-Apr-2021 07:16:35

2K+ Views

Tkinter text widgets are used for creating text fields that contain multiline user input. It has many inbuilt functions and methods which can be invoked to perform certain operations on text widgets. In contrast, let us assume that we have written a bunch of context in the text widget and ... Read More

Resizing pictures in PIL in Tkinter

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 16-Apr-2021 07:14:47

824 Views

Python provides Pillow or PIL package for image processing which is used to load, process, and customize the images in an application. It has many properties like Color of the image, Image Font, resizing the images, loading the image, etc.In order to resize the Images in an application, we can ... Read More

Advertisements