Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Tk_center_window.py
- import Tkinter
- root=Tkinter.Tk()
- x = (root.winfo_screenwidth() - root.winfo_reqwidth()) / 2
- y = (root.winfo_screenheight() - root.winfo_reqheight()) / 2
- root.geometry("124x24+%d+%d" % (x, y))
- label=Tkinter.Label(root,text='Hello ,World!')
- label.pack()
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement