Dev Prakash Sharma has Published 556 Articles

How to update information in the grid in Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 18-Jun-2021 14:17:06

479 Views

Let us suppose that a Tkinter application has widgets placed in the window using the Grid Geometry Manager. In order to change the properties of the Tkinter widgets, we can use configure(**options) method. While rendering the widgets in the window, we have to assign the constructor to a variable that ... Read More

Moving balls in Tkinter Canvas

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 18-Jun-2021 14:16:47

2K+ Views

Tkinter is a standard Python library which is used to create GUI-based applications. To create a simple moving ball application, we can use the Canvas widget which allows the user to add images, draw shapes, and animating objects. The application has the following components, A Canvas widget to draw the ... Read More

How to capture events on Tkinter child widgets?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 18-Jun-2021 14:16:13

459 Views

Suppose we are creating an application that interacts with the user clicks on the Button visible in the application. To understand how exactly events work, we have to create a callback function as well as a trigger that will execute an event. Whenever the user clicks the button, the event ... Read More

Where to learn Tkinter for Python?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 18-Jun-2021 14:15:56

161 Views

Without a doubt, Python has a rich library of modules and extensions that can be used to structure an application the way we want. Tkinter is a well-known Python library that is used for building GUI-based desktop applications. Tkinter offers a robust and platformindependent window toolkit.Tkinter is a package that ... Read More

How to create a Tkinter toggle button?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 18-Jun-2021 14:14:23

3K+ Views

Python has a rich set of libraries and modules that can be used to build various components of an application. Tkinter is another well-known Python library for creating and developing GUI-based applications. Tkinter offers many widgets, functions, and modules that are used to bring life to the application visuals. We ... Read More

What is the difference between focus and focus_set methods in Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 18-Jun-2021 14:03:56

1K+ Views

Focus is used to refer to the widget or window which is currently accepting input. Widgets can be used to restrict the use of mouse movement, grab focus, and keystrokes out of the bounds. However, if we want to focus a widget so that it gets activated for input, then ... Read More

How can I change the text of the Tkinter Listbox item?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 18-Jun-2021 13:56:14

885 Views

To display a list of items in the application, Tkinter provides a Listbox widget. It is used to create a list of items vertically. When we want to change the text a specific Listbox item, then we have to first select the item by iterating over the listbox.curselection() and insert a ... Read More

Delete and Edit items in Tkinter TreeView

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 18-Jun-2021 13:54:55

14K+ Views

Tkinter Treeview widget is used to display the data in a hierarchical structure. In this structure, each row can represent a file or a directory. Each directory contains files or additional directories. If we want to create a Treeview widget, then we can use Treeview(parent, columns) constructor to build the table.The ... Read More

How to get coordinates on scrollable canvas in Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 18-Jun-2021 13:51:49

1K+ Views

The canvas widget has two coordinate systems: (a) Window coordinate system and (b) canvas coordinate system. The window coordinate system always starts from the leftmost corner (0, 0) in the window, while the canvas coordinate system specifies where the items are actually placed in the canvas.To convert the window coordinate ... Read More

What is correct: widget.rowconfigure or widget.grid_rowconfigure in Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 18-Jun-2021 13:51:32

4K+ Views

While building an application with Tkinter, we can use many components and widgets to extend the application. To render the widgets in the application, we use the Geometry Manager.The geometry manager configures the widget position and size within the window. The Grid Geometry manager treats the widget to place in ... Read More

Advertisements