Kiran Kumar Panigrahi has Published 426 Articles

How can I determine the position of a Toplevel in Tkinter?

Kiran Kumar Panigrahi

Kiran Kumar Panigrahi

Updated on 26-Oct-2021 12:45:08

1K+ Views

To place objects in the middle of a frame, we can use the place method. Let's take an example and see how it's done.Steps −Import the required libraries and create an instance of tkinter frame.Set the size of the frame using win.geometry method.Next, create a button and label it.Set the ... Read More

How to place objects in the middle of a frame using tkinter?

Kiran Kumar Panigrahi

Kiran Kumar Panigrahi

Updated on 26-Oct-2021 12:40:58

3K+ Views

To place objects in the middle of a frame, we can use the place method. Let's take an example and see how it's done.Steps −Import the required libraries and create an instance of tkinter frame.Set the size of the frame using win.geometry method.Next, create a button and label it.Set the ... Read More

How do I position the buttons on a Tkinter window?

Kiran Kumar Panigrahi

Kiran Kumar Panigrahi

Updated on 26-Oct-2021 12:38:26

8K+ Views

To set the position of a button, we use the place method of button widget. The place method takes the x and y coordinates of the button.Steps −Import the required libraries and create an instance of tkinter frame.Set the size of the frame using win.geometry method.Next, create multiple buttons and ... Read More

How to bind a Tkinter event to the left mouse button being held down?

Kiran Kumar Panigrahi

Kiran Kumar Panigrahi

Updated on 26-Oct-2021 12:35:43

2K+ Views

To bind a Tkinter event to the left mouse button being held down, we can take the following steps −Create an instance of tkinter frame.Set the size of the frame using win.geometry method.Define an event handler "handler1" to print a statement when the mouse is moved with the left button ... Read More

How to save the contents of a Textbox in Tkinter?

Kiran Kumar Panigrahi

Kiran Kumar Panigrahi

Updated on 26-Oct-2021 12:32:06

6K+ Views

To save the contents of a Textbox in Tkinter, we can take the following steps −Create an instance of tkinter frame.Set the size of the frame using win.geometry method.Define a user-defined method "open_text" to open a text file in "read" mode. Read the contents of the text file and save ... Read More

How to make a new folder using askdirectory dialog in Tkinter?

Kiran Kumar Panigrahi

Kiran Kumar Panigrahi

Updated on 26-Oct-2021 12:25:13

2K+ Views

To make a new folder using askdirectory dialog in Tkinter, we can take the following steps −Import the required modules. filedialog module is required for askdirectory method. os module is required for makedirs method.Create an instance of tkinter frame.Set the size of the frame using win.geometry method.Define a user-defined method ... Read More

Advertisements