Problem resizing a window and button placement
Steve GS
Gronicus at SGA.Ninja
Fri Feb 23 23:33:05 EST 2024
How do I extract the values
from args?
SGA
-----Original Message-----
From: Python-list
<python-list-bounces+gronicus=
sga.ninja at python.org> On
Behalf Of MRAB via Python-list
Sent: Friday, February 23,
2024 9:27 PM
To: python-list at python.org
Subject: Re: Problem resizing
a window and button placement
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/mailma
n/listinfo/python-list
More information about the Python-list
mailing list