Basic Python Messagebox size change

2.6k Views Asked by At

How do I change the size of the window that this message-box appears in? I built the box myself to allow me to change the option to "Thanks".

Here is my code so far:

def messageWindow():
    win = Toplevel()
    win.title('warning')
    message = "This will delete stuff"
    Label(win, text=message).pack()
    Button(win, text='Thanks!', command=win.destroy).pack()
1

There are 1 best solutions below

1
On

You could use the geometry method to set the dimensions of your window.

Example:

win.geometry("500x500")