Dev Prakash Sharma has Published 556 Articles

How to set padding of all widgets inside a window or frame in Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 22-Dec-2021 10:42:47

4K+ Views

Padding enhances the layout of the widgets in an application. While developing an application in Tkinter, you can set the padding in two or more ways. The geometry manager in Tkinter allows you to define padding (padx and pady) for every widget (label, text, button, etc). To set the application ... Read More

How to close only the TopLevel window in Python Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 22-Dec-2021 10:40:56

2K+ Views

The Toplevel window is an option to create a child window in an application. It works similar to the default main tkinter window. We can configure the size of a Toplevel window, customize its properties and attributes as well as add widgets that we want to build the component with.For ... Read More

Difference between .pack and .configure for widgets in Tkinter

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 22-Dec-2021 10:39:18

793 Views

We use various geometry managers to place the widgets on a tkinter window. The geometry manager tells the application where and how to organize the widgets in the window. With geometry manager, you can configure the size and coordinates of the widgets within the application window.The pack() method in tkinter ... Read More

Python Tkinter – How to export data from Entry Fields to a CSV file?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 22-Dec-2021 10:37:34

4K+ Views

The Entry widget is used to accept single-line text strings from users.Text widget − Displays multiple lines of text that can be edited.Label widget − Displays one or more lines of text that cannot be modified by the user.Importing tkinter, csv and creating the main window. Name the output window ... Read More

How to create an impressive GUI in Python using Tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 22-Dec-2021 08:19:41

783 Views

Tkinter is a standard Python GUI library in Python, which gives us an object-oriented interface with Tk GUI Toolkit. It's amazing how quickly one can create some really impressive looking apps. Actions in GUI are usually performed through direct manipulation of graphical elements.We will take a simple "addition" application to ... Read More

How to directly modify a specific item in a TKinter listbox?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 22-Dec-2021 08:13:47

787 Views

Tkinter is a Python-based GUI application development library which is generally used to build useful functional desktop applications. The Listbox widget is another tkinter widget, which is used as a container to display a list of items in the form of a Listbox.To define a list of items in a ... Read More

How to change the background color of a tkinter Canvas dynamically?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 22-Dec-2021 08:11:43

15K+ Views

The Canvas widget is one of the most useful widgets in Tkinter. It has various functionalities and features to help developers customize the application according to their need. The Canvas widget is used to display the graphics in an application. You can create different types of shapes and draw objects ... Read More

How to explicitly resize frames in tkinter?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 22-Dec-2021 08:10:07

4K+ Views

The Frames widget in tkinter is generally used to display widgets in the form of a container. The Frame widget works similar to the default window container. The geometry and size of the frame widget can be configured using various geometry managers available in the tkinter library.Considering the case, if ... Read More

Tkinter – How to create colored lines based on length?

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 22-Dec-2021 08:06:11

922 Views

Tkinter Canvas widget is one of the versatile widgets which is generally used to draw shapes, arcs, objects, display images or any content. The objects inside the Canvas widget can be modified as well as configured using the configure() method or within the constructor by providing values to the properties.To ... Read More

Changing Tkinter Label Text Dynamically using Label.configure()

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 22-Dec-2021 08:04:25

6K+ Views

The Label widget in tkinter is generally used to display text as well as image. Text can be added in a Label widget by using the constructor Label(root, text= "this is my text"). Once the Label widget is defined, you can pack the Label widget using any geometry manager.If you ... Read More

Advertisements