[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


Greetings,
     I was looking for some guidance on a issue(s) that popped up for IDLE
on the issue tracker here:
http://bugs.python.org/issue14146

But is starting to creep into other places such as the find and replace
dialogs:
http://bugs.python.org/issue17511

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.pack()
text.insert(INSERT, "".join(map(str, range(100))))
text.tag_add(SEL, "1.0", "end")
text.focus_set()

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

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

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:

https://sourceforge.net/tracker/?func=detail&aid=3609608&group_id=12997&atid=112997

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