[Tkinter-discuss] Bug with Tk Text Widget hi-lights disappear when text widget loses focus on Windows

Todd Rovito rovitotv at gmail.com
Sun Mar 31 20:04:00 CEST 2013

     I was looking for some guidance on a issue(s) that popped up for IDLE
on the issue tracker here:

But is starting to creep into other places such as the find and replace

Recently I tested with Tk 8.5.13 and Tk 8.6 and both have the problem.  We
created a small test program to demonstrate the issue without IDLE:

from tkinter import *

main = Tk()
text = Text(main, width=40, height=10, wrap="char")
text.insert(INSERT, "".join(map(str, range(100))))
text.tag_add(SEL, "1.0", "end")

def jump():
    text.after(500, btn.focus_set)
    text.after(1000, text.focus_set)

btn = Button(main, text="Click me", command=jump)

This program is for Python 3.x and behaves differently on Windows when
compared to Linux or Mac.  Earlier today I filed a bug report with the Tk
folks here:


But I also wanted to post something here in case it was a tkinter
issue.  Any feedback or help would be greatly appreciated thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20130331/2753893f/attachment.html>

More information about the Tkinter-discuss mailing list