Dev Prakash Sharma has Published 585 Articles

Creating a LabelFrame inside a Tkinter Canvas

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 16-Dec-2021 10:54:10

Tkinter provides many built-in widgets which can be used to create highlevel desktop applications. The LabelFrame widget is one of them, which allows the users to add a labelled frame. The Label is another widget in the LabelFrame, which is used to add text or images in a frame or ... Read More

How to get a new API response in a Tkinter textbox?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 16-Dec-2021 10:52:25

APIs are extremely useful in implementing a service or feature in an application. APIs help to establish the connection between the server and a client, so whenever a client sends a request using one of the API methods to the server, the server responds with a status code (201 as ... Read More

Adding coloured text to selected text in Tkinter

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 16-Dec-2021 10:42:46

If we want to implement a text editor in an application that can accept multiline user input, then we can use the Tkinter Text widget. The Text widget in Tkinter is generally used to create a text editor for an application, where we can write text and perform operations like ... Read More

How to set a certain number of rows and columns of a Tkinter grid?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 16-Dec-2021 10:41:34

In Tkinter, you can set the GUI of the application by using a different geometry manager. The grid geometry manager is one of the most useful geometry managers in tkinter that is used to set the widgets location in the application using the 2D geometry form.With a grid geometry manager, ... Read More

Drawing a line between two mouse clicks using tkinter

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 11-Oct-2021 07:45:01

Consider a case for creating a GUI application such that when we click on the window with a mouse button, it stores the coordinates and creates a line between two given points. Tkinter provides events that allow the user to bind the keys or buttons with the functions.To draw a ... Read More

Initialize a window as maximized in Tkinter Python

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 08-Oct-2021 13:03:25

Tkinter creates a default window with its default size while initializing the application. We can customize the geometry of the window using the geometry method.However, in order to maximize the window, we can use the state() method which can be used for scaling the tkinter window. It maximizes the window ... Read More

Creating Tkinter full-screen application

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 08-Oct-2021 13:01:26

Tkinter initially creates a window that contains application components such as widgets and control bars. We can switch a native-looking application to a full-screen application by using the attribute(‘-fullscreen’, True) method. To make the window full-screen, just invoke the method with the particular window.Example# Import tkinter library from tkinter import ... Read More

How to add text inside a Tkinter Canvas?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 27-Sep-2021 14:54:14

Canvas is undoubtedly one of the most versatile widgets in tkinter. With Canvas, we can create shapes, texts, animate stuff, modeling 3D shapes, modeling simulations, and many more.In order to add text inside a tkinter frame, we can use the create_text() method. We can define create_text() by adding values of ... Read More

Taking input from the user in Tkinter

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 20-Aug-2021 16:27:41

There might be times when we need to take the user input in our Tkinter application. We can get the user Input in a Single Line text input through the Entry widget using get() method. To display the Captured input, we can either print the message on the screen or ... Read More

Get contents of a Tkinter Entry widget

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 20-Aug-2021 16:25:39

An Entry widget is a basic one-line character widget that supports only single-line text input. An Entry widget can be defined by initializing the Entry(parent, width) constructor.To validate the Entry widget, we can use the get() method which results in the character entered in the Entry widget.Let us define an Entry ... Read More

Previous 1 ... 3 4 5 6 7 ... 59 Next
Advertisements