Dev Prakash Sharma has Published 414 Articles

How to disable multiselection on Treeview in tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 16-Dec-2021 11:04:14

2K+ Views

The Treeview widget is used to display a list of items with more than one feature in the form of columns. By default, the listed items in a Treeview widget can be selected multiple times, however you can disable this feature by using selectmode="browse" in the Treeview widget constructor. The ... Read More

How to clear the text field part of ttk.Combobox in tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 16-Dec-2021 11:00:13

5K+ Views

The Combobox widget is one of the versatile widgets in tkinter that is used to create a dropdown list containing some values in it. You can select a value from the dropdown list that gets replaced by the default value of the combobox widget. You can create a combobox widget ... Read More

How do I open a website in a Tkinter window?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 16-Dec-2021 10:56:45

5K+ Views

Tkinter offers many built-in functions and methods that contain several utility functions to help us construct a user-friendly application. In tkinter, if you want to open a webpage, you can use the built-in Python library, webview, which allows the users to view the HTML content in its own native GUI ... Read More

Creating a LabelFrame inside a Tkinter Canvas

Dev Prakash Sharma

Dev Prakash Sharma

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

2K+ Views

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

1K+ Views

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

1K+ Views

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

4K+ Views

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

1K+ Views

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

Creating Tkinter full-screen application

Dev Prakash Sharma

Dev Prakash Sharma

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

3K+ Views

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

Get contents of a Tkinter Entry widget

Dev Prakash Sharma

Dev Prakash Sharma

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

4K+ Views

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

Advertisements