[Tkinter-discuss] How to eliminate flickers when swapping frames?

Nam Nguyen namnguyen at google.com
Tue Mar 27 21:18:50 EDT 2018


Is my code out of whack or is it "standard" enough to your seasoned eyes?
Is there any guess as to a fix to this flickering, be it with my code, or
Tk itself?
Thanks!
Nam

On Tue, Mar 27, 2018, 2:24 PM Michael Lange <klappnase at web.de> wrote:

> Hi,
>
> On Tue, 27 Mar 2018 13:27:06 -0700
> Nam Nguyen via Tkinter-discuss <tkinter-discuss at python.org> wrote:
>
> > I'm running i3-wm on Debian and this code tends to flicks more when I
> > have my mouse over the buttons.
> > Nam
>
> I see some flicker here, too. The additional flicker when the mouse
> hovers over the window is apparently due to the <Enter> event that occurs
> after the widget was packed, which switches the button's background to
> the activebackground color. The (here rather tiny) flicker with the mouse
> outside the window is maybe only due to the time Tk needs to redraw the
> window.
> This effect can be observed more closely when you set the background
> color of one button for example to "red" and to "green" for the other.
> You will get much more flicker all of a sudden.
>
> Best regards
>
> Michael
>
> .-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.
>
> Witch!  Witch!  They'll burn ya!
>                 -- Hag, "Tomorrow is Yesterday", stardate unknown
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20180328/286b409e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4849 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20180328/286b409e/attachment.bin>


More information about the Tkinter-discuss mailing list