Title: Frame does not receive configure event on move
Type: behavior Stage: test needed
Components: Tkinter Versions: Python 2.6
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: loewis Nosy List: akameswaran, gpolo, loewis
Priority: normal Keywords:

Created on 2005-01-11 19:02 by akameswaran, last changed 2009-04-22 20:03 by gpolo. This issue is now closed.

File name Uploaded Description Edit akameswaran, 2005-01-11 19:02 simple code which shows the problem
Messages (2)
msg23927 - (view) Author: Anand Kameswaran (akameswaran) Date: 2005-01-11 19:02
Python : 2.4
OS: WInXP sp2.
I have created a frame attached to a Tk().
The frame is bound to the configure sequence.  However,
the frame does not get a configure on a move, but does
get a configure event on a resize.  This seems odd as
the root does get an event for both resize and move,
but only forwards one of them.
I have included a sample of the problem.
msg86324 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009-04-22 20:03
That is because only the root window changed the position, a Configure
event is fired whenever the window changes its size, position, or border
width, and sometimes when it has changed position in the stacking order.

Try changing your example to verify this.

import Tkinter

def root_conf(event):
    print "root", event.x, event.y

def frame_conf(event):
    print "frame", event.x, event.y

root = Tkinter.Tk()
root.bind('<Configure>', root_conf)

frame = Tkinter.Frame(root)
lbl = Tkinter.Label(frame, text="Test")
frame.bind('<Configure>', frame_conf)

Date User Action Args
2009-04-22 20:03:03gpolosetstatus: open -> closed
resolution: not a bug
messages: + msg86324
2009-04-22 16:03:27ajaksu2setnosy: + gpolo
2009-02-14 22:21:14ajaksu2setstage: test needed
type: behavior
versions: + Python 2.6, - Python 2.4
2005-01-11 19:02:12akameswarancreate