- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to specify where a Tkinter window should open?
Tkinter window can be configured using the Geometry Manager. When we specify the main window using the geometry(width x height + position_right + position_left) method, then we generally enable the window to open in a particular position.
Example
#Import the required libraries from tkinter import * #Create an instance of Tkinter Frame win = Tk() #Set the geometry win.geometry("700x350+300+300") #Create a Label Label(win, text="This Window Opens at (300,300)", font=('Helvetica 15 bold')).pack(pady=30) win.mainloop()
Output
Running the above code will display a window at the specified position with a label text.
- Related Articles
- How do I open a website in a Tkinter window?
- How to open a new window by the user pressing a button in a tkinter GUI?
- How do we specify the target for where to open the linked document in HTML?
- How to open link in a new window - JavaScript?
- How to add a margin to a tkinter window?
- How to make a Tkinter window not resizable?
- How to delete Tkinter widgets from a window?
- How to set a Tkinter window to a constant size?
- Tkinter-How to get the current date to display in a tkinter window?
- How to specify the file path in a tkinter filedialog?
- How do I close a tkinter window?
- How to open External Programs using Tkinter?
- How to show webcam in TkInter Window?
- How to Set a Tkinter Window with a Constant Size?
- How to close a Tkinter window by pressing a Button?

Advertisements