On 2024-02-24 01:14, Steve GS via Python-list wrote:
Python, Tkinter: How do I
determine if a window has been
resized? I want to locate
buttons vertically along the
right border and need to know
the new width. The buttons are
to move with the change of
location of the right-side
border.

Bind an event handler for '<Configure>':

----8<----

import tkinter as tk

def on_configure(*args):
    print(args)

root = tk.Tk()
root.bind('<Configure>', on_configure)
root.mainloop()

----8<----

Are you placing the buttons yourself? I always use layouts and they handle such things automatically.

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to