Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tkinter - Resize Events?

2,355 views
Skip to first unread message

Sven Havemann

unread,
Jan 12, 1998, 3:00:00 AM1/12/98
to

Hi Python/Tkinter experts!
==========================

I need to catch the window-resize-event of my Tkinter-Toplevel-Window.
I've tried to do it the following way, but Python 1.5 refuses to let me
do it like that; however, neither in the Python- nor in the
Tk-documentation I've found the appropriate event to bind to. Can
anybody help me?

Thanks in advance, your's, Sven.

from Tkinter import *

class MyModule:

def __init__(self,master):
self.master=master
self.top = Toplevel(menu=self.menubar)
self.top.bind("<Resize>",self.resizeEvent)
...

def resizeEvent(self,event):
print "Toplevel has been resized"

--
--------------------------------------------------------------------------
Sven Havemann - Rosental 24 - 53111 Bonn - Deutschland -
0049/228/656860
Keywords: Polynomial Curves & Surfs, Generative Modeling, 4D
Animation
FG Computergraphik:
Institut f. Informatik III, Tel: (0228) 73-4391
Universitaet Bonn Fax: (0228) 73-4382
Roemerstr. 164, Mail: have...@graphics.cs.uni-bonn.de
D-53117 Bonn, Deutschland WWW:
http://hyperg.cs.uni-bonn.de/~havemann
--------------------------------------------------------------------------

Fredrik Lundh

unread,
Jan 13, 1998, 3:00:00 AM1/13/98
to

Case Roole wrote:
>Use <Configure> instead of <Resize>.
>
>Generally, the events of Tk are those of the window manager, so you should
>refer to the latter's documentation.

That's the X window manager. If you're on Windows, you won't
find anything about this in the Windows User Guides ;-)

For a list of the most common (and portable) events and protocols, see
http://www.pythonware.com/library/tkinter/introduction/intro06.htm

Cheers /F (tkinter-info-bot)

PS. Don't y'all think that my tk-bot's more likely to survive the
turing test than tchrist's don't-you-dare-thinking-that-anything-
can-be-better-than-perl-bot? ;-)


0 new messages