Dev Prakash Sharma has Published 548 Articles

Inheriting from Frame or not in a Tkinter application

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 07-Jun-2021 10:51:16

1K+ Views

In the Object-Oriented Programming Paradigm, Inheritance is used for acquiring the properties of the base class and using them in a derived class. Considering the case for a Tkinter application, we can inherit all the properties of a frame defined in a base class such as background color, foreground color, ... Read More

Creating scrollable Listbox within a grid using Tkinter

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 26-May-2021 12:13:53

3K+ Views

A Listbox widget displays a list of items such as numbers list, items list, list of employees in a company, etc. There might be a case when a long list of items in a Listbox needs a way to be viewed inside the window. For this purpose, we can attach ... Read More

Vertical and Horizontal Scrollbars on Tkinter Widget

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 26-May-2021 12:13:02

4K+ Views

Scrollbars are useful to provide dynamic behavior in an application. In a Tkinter application, we can create Vertical as well as Horizontal Scrollbars. Scrollbars are created by initializing the object of Scrollbar() widget.To create a horizontal scrollbar, we have to provide the orientation, i.e., "horizontal" or "vertical". Scrollbars can be ... Read More

Call a Function with a Button or a Key in Tkinter

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 26-May-2021 12:10:47

11K+ Views

Let assume that we want to call a function whenever a button or a key is pressed for a particular application. We can bind the function that contains the operation with a button or key using the bind(', ' callback_function) method. Here, you can bind any key to the event ... Read More

How to clear Text widget content while clicking on the Entry widget itself in Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 26-May-2021 12:09:09

4K+ Views

Tkinter Text widget is an Input widget that supports multiline user input. It is also known as Text Editor which allows users to write the content and data in it. The content of the text widget can be cleared by defining the delete(0, END) command. Similarly, we can clear the ... Read More

How to change the Entry Widget Value with a Scale in Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 26-May-2021 12:07:50

2K+ Views

Tkinter Entry widget is an input widget that supports only single-line user input. It accepts all the characters in the text field unless or until there are no restrictions set for the input. We can change the value of the Entry widget with the help of the Scale widget. The ... Read More

How to use pip or easy_install Tkinter on Windows?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 26-May-2021 12:07:27

1K+ Views

Tkinter is a Python library that is used to develop desktop-based GUI applications. In order to develop a Tkinter application, we have to make sure that Python is installed in our local system. We can install Tkinter in our local machine by using the pip install tkinter command in the ... Read More

How to set the tab order in a Tkinter application?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 26-May-2021 12:05:10

2K+ Views

The Tab order in any application decides which element of the application have to set focus. In a Tkinter application, it constantly looks for the next widget that needs to be focused on. To set the tab order in the application, we can define a function and pick all the ... Read More

Keyboard shortcuts with Tkinter in Python 3

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 26-May-2021 12:01:30

5K+ Views

Tkinter window contains many inbuilt functionalities and features which can be taken and used for various application development. There might be cases when we have to run a particular part of the application with the help of some key or function. It can be achieved by binding a particular key ... Read More

How to connect a variable to the Tkinter Entry widget?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 26-May-2021 11:59:24

7K+ Views

Tkinter Entry widget is an Input widget that supports and accepts single-line user input. It accepts all types of characters in UTF-8 module. In order to get the input from the Entry widget, we have to define a variable (based on Data Types it accepts) that accepts only string characters. ... Read More

Advertisements