Hi,

On Wed, 28 Mar 2018 01:18:50 +0000
Nam Nguyen <namngu...@google.com> wrote:

> 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?

of course you could address the "mouse over widget" issue with something
like

  b1 = tk.Button(f_1, text='Frame 1', font=my_font)
  b1.pack(expand=True, fill=tk.BOTH)
  bg = b1.cget('background')
  b1.configure(activebackground=bg)
  f_2 = tk.Frame(root)
  tk.Button(f_2, text='Frame 2'[::-1], font=my_font,
           activebackground=bg).pack( expand=True, fill=tk.BOTH)

For the flicker that remains, I don't think there is much one can do
about it. If my assumption that it comes simply from the redrawing
operation is correct, I am afraid that there is no remedy (at least none
that I am aware of). Here it is barely visible but this might depend on
the speed of the system. When Brian says that he does not notice any
flicker at all, that might just be because his machine is faster than
mine. Of course there is still a chance that I have been missing
something.

Best regards

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

Our way is peace.
                -- Septimus, the Son Worshiper, "Bread and Circuses",
                   stardate 4040.7.
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to