Sunday 15 April 2012

tkinter - odd behavior with '' callback -


When I & lt; Configure & gt; On the label I am using the image to keep the size of which I want to resize because the shape of the topolol has been changed.

According to the document, & lt; Configure & gt; Callback When the user changes the window size (i.e. topelvel) then called. I am finding out that the callback is not being called a user interaction. In fact, when I update the image to replace the header to , which is towards a troubled loop , Which happens when the user moves (!) The window is event.width and / or event.height in each call slightly big or small, on this Depending on how I changed the image size it is almost As I was triggering the call callback setting the new image ( Label.configure (image = {newImage}) , but it does not make any sense.

I did it I have tried to trace with PDB, but I think there is a call coming from Tuker, there is no indication of who has led it. I had a small demo program (which I included here Tried to duplicate) But I can not do that, so I'm hoping someone will be able to answer at least this question:

In addition to the user

thanks

whenever the widget The shape changes, then the event is removed. It is not restricted to changing the interactive size. If your binding widget resizes, then the event will be re-generated.

According to:

The configured event is sent in a window whenever its size, position, or border width change, and sometimes when the status changed in stacking order Ho.

No comments:

Post a Comment