Dev Prakash Sharma has Published 556 Articles

How to hide and show canvas items on Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 19-Jun-2021 08:34:29

3K+ Views

The Canvas widget is one of the versatile widgets in Tkinter. It is used in many applications for designing the graphical user interface such as designing, adding images, creating graphics, etc. We can add widgets in the Canvas widget itself. The widgets that lie inside the canvas are sometimes called ... Read More

How do I get the index of an item in Tkinter.Listbox?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 19-Jun-2021 08:34:09

4K+ Views

We use the Tkinter Listbox widget to create a list of items. Each item in the listbox has some indexes that are assigned to them sequentially in vertical order.Let us suppose that we want to get the index of a clicked item in the listbox. Then, we have to first ... Read More

How do I center the text in a Tkinter Text widget?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 19-Jun-2021 08:33:48

16K+ Views

Tkinter text widget is a multiline text input widget. It is used to insert, delete, and add textual data in the input field. It provides many built-in functions and attributes in its widget class.To configure and align the text at the CENTER of a Tkinter Text widget, we can use ... Read More

Difference between title() and wm_title() methods in Tkinter class

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 19-Jun-2021 08:33:29

728 Views

Tkinter has a definite class hierarchy which contains many functions and built-in methods. As we create applications, we use these functions to build the structure of components.The wm class stands for "window manager" that is a mixin class that provides many builtin functions and methods.The method wm_title() is used to change ... Read More

How to edit a Listbox item in Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 19-Jun-2021 08:32:36

3K+ Views

Tkinter Listbox widget is generally used to create a list of items. It can store a list of numbers, characters and support many features like selecting and editing the list items.To edit the Listbox items, we have to first select the item in a loop using listbox.curselection() function and insert a ... Read More

How to make a system tray application in Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 19-Jun-2021 08:32:06

4K+ Views

A System Tray application is created for the continuous execution of the program. Whenever an application is closed by the user, it will get its state running on the taskbar. To identify a system tray application, we can provide an image or icon to its application.To create a System Tray ... Read More

How to add Label width in Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 19-Jun-2021 08:31:27

2K+ Views

A Label widget is used to display text and images in an application. The size of the label widget depends on a number of factors such as width, height, and Font-size of the Label text. The height and width define how the label widget should appear in the window.To set ... Read More

How to set the height/width of a Label widget in Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 19-Jun-2021 08:30:02

17K+ Views

The Label widgets are used for displaying text and images in the application. The size of the label widget depends on a number of factors such as width, height, and Font-size of the Label text.The height and width define how the label widget should appear in the window. To set ... Read More

How to stop a loop with a stop button in Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 19-Jun-2021 08:29:35

6K+ Views

Consider a case of running a process in a loop and we want to stop the loop whenever a button is clicked. Generally, in programming languages, to stop a continuous while loop, we use a break statement. However, in Tkinter, in place of the while loop, we use after() to run the defined function ... Read More

Undo and redo features in a Tkinter Text widget

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 19-Jun-2021 08:29:07

1K+ Views

Tkinter Text widget is another input widget similar to the Entry widget which accepts multiline user input in a text field. It contains many inbuilt features and functions which helps to configure the default properties of the text widget. However, to add undo/Redo features in the Tkinter text widget, we ... Read More

Advertisements