continuous call of the Configure event in tkinter -


i trying write function dynamically resize image displayed in tkinter window. therefore bound function configure event:

connroot.bind( "<configure>", connresiz)

my problems are

1) connresiz() function gets called 3 times (why 3?) @ program start, and

2) more troublesome, dynamically resizing window calls function continuously drag mouse! how can avoid this?

i thought checking @ simultaneous presence of <configure> , <buttonrelease-1> events, dont know how code it

according official tk documentation, <configure> events fire "whenever size, position, or border width changes, , when has changed position in stacking order." can happen several times during startup.

it called continuously while resize window because size of widget changing. that's it's defined do. can't prevent being called, though can modify in callback. example, delay resizing image until you've not received <configure> event second or 2 -- means user has stopped interactive resizing.


Comments