tkinter how to make a root non rezizable
root.resizable(False, False)
tkinter how to make a root non rezizable
root.resizable(False, False)
python tkinter resize window on button click
from tkinter import *
root = Tk()
root.title("Title")
root.geometry("800x800")
# Resize on button click
def resize():
root.geometry("500x500")
button_1 = Button(root, text="Resize", command=resize)
button_1.pack(pady=20)
# Resize by parameters
def resize2():
w = 650
h = 650
root.geometry(f"{w}x{h}")
button_2 = Button(root, text="Resize", command=resize2)
button_2.pack(pady=20)
# Resize by user entered parameters
def resize3():
w = width_entry.get()
h = height_entry.get()
root.geometry(f"{w}x{h}")
width_label = Label(root, text="Width:")
width_label.pack(pady=20)
width_entry = Entry(root)
width_entry.pack()
height_label = Label(root, text="Height:")
height_label.pack(pady=20)
height_entry = Entry(root)
height_entry.pack()
button_3 = Button(root, text="Resize", command=resize3)
button_3.pack(pady=20)
root.mainloop()
how to resize tkinter window
import tkinter
window = tkinter.Tk() # creating the window object
window.title('my first GUI program')
window.minsize(width=600, height=500) # makes the window 500*600
window.mainloop() # keeping the window until we close it
how to make a resizable python tkinter window have a limit
win.wm_minsize(180, 120)
#Change the two numbers to the minimum window width and minimum window height.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us