Answers for "set size of root tkinter"

8

set window size tkinter

# Change window_name to the name of the window object, i.e. root
window_name.geometry("500x500")
# To ensure widgets resize:
widget_name.pack(fill="both", expand=True)
Posted by: Guest on February-27-2020
0

tkinter root geometry size and position

from tkinter import *

root = Tk()
 
# creating fixed geometry of the
# tkinter window with dimensions 150x200
# Positions the window at x=400 and y=300
root.geometry('200x150 + 400 + 300')
 
root.mainloop()
Posted by: Guest on September-16-2021

Python Answers by Framework

Browse Popular Code Answers by Language