Issue 1100366: Frame does not receive configure event on move (original) (raw)

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.

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('', root_conf)

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

root.mainloop()