Tkinter is a Python module which is used to develop GUI (Graphical User Interface). It comes along with the Python so one do not has to install but can be done using pip command.
Tkinter provides various universal method one of them is geometry() method. This method is used to set the dimensions of the Tkinter window as well as it is used to set the position of the main window on the user’s desktop.
Code #1: Tkinter window without using geometry method.
As soon as you run the application you’ll see the position of the Tkinter window is at the north-west position of the screen and size of the window is also small as shown in output.
Note: We can also pass variable argument in the geometry method but it should be in the form (variable1) x (variable2) otherwise it will raise an error.
- Python | after method in Tkinter
- Python | pack() method in Tkinter
- destroy() method in Tkinter | Python
- Python | grid() method in Tkinter
- resizable() method in Tkinter | Python
- iconphoto() method in Tkinter | Python
- Python | place() method in Tkinter
- maxsize() method in Tkinter | Python
- minsize() method in Tkinter | Python
- Python Tkinter | grid_location() and grid_size() method
- Python | forget_pack() and forget_grid() method in Tkinter
- Python Tkinter | Moving objects using Canvas.move() method
- Python GUI - tkinter
- RadioButton in Tkinter | Python
- Different messages in Tkinter | Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.