# Python/TkInter: how to prevent flickering during geometry layout



## Odman (Jul 24, 2014)

Hi,

I'm designing a fairly complex GUI in tkinter where I use the grid() GM. 
One of the features is to bind key events to a function changing the font size. This will propagate through the entire GUI until eventually the size of the root window changes.
All functions work, however a cosmetic issue is that the GUI is flickering while the new geometry is being worked out. I would prefer that users didn't have to see "how the sausage is being made", but instead get the whole new window layout in one shot when ready.
Some GUI systems have the ability to render in the background. Often a callback can be assigned when layout/rendering is complete and then one can call an update function to make the new layout visible.
Does anone know of anything of that sort in Tkinter? I'm using version 2.7.8, but I can upgrade if there is a solution available in later versions.

Thank you for your time!

PS: as this is a performance related issue, I cannot illustrate the issue with a small code snippet, as the flickering will only happen when you have a more complex layout.


----------

