Re: ttk.Treeview: coloring rows using tags doesn't work with Python 3.7.3
Sibylle Koczian <[email protected]> Tue, 30 Apr 2019 19:28:57 +0200
| Newsgroups | gmane.comp.python.tkinter |
|---|---|
| Message-ID | <[email protected]> |
Am 30.04.2019 um 15:38 schrieb Emiliano: > > > El 29 de abril de 2019 8:16:50 AM GMT-03:00, Sibylle Koczian <[email protected]> escribió: >> Hello, >> >> the following script shows a Treeview with names and country codes of >> some towns in Germany. Towns with country code "HE" or "BY" should be >> shown with coloured background, in the case of "BY" additionally with >> white text. >> >> This works using Python 3.5 or 3.6. I seem to remember that it worked >> with earlier versions of Python 3.7, but that's not certain. Using >> Python 3.7.3 all the entries have white background and black text. >> Opening an entry with Enter or double click shows the name of the town >> in the Entry field, together with the country name, if the row has the >> tag for HE or BY. So the entries have the tags they should, but the >> color doesn't change. >> >> Changing the font of an entry using tags does work. >> >> All of these Python versions come with tcl/tk version 8.6, but I don't >> know the patch numbers, they probably changed. The official >> documentation for tkinter and for tcl/tk seems to show that the script >> is correct. I can see no hint of recent changes in the use of tags, >> tag_configure and the options usable with tags. >> > > Maybe you hit this bug? > > http://core.tcl.tk/tk/tktview?name=509cafafae > Yes, that seems exactly right. I put the tkinter workaround by ulfalizer into my script and now the entries are coloured as they should. The discussion is helpful too. Many thanks! Sibylle _______________________________________________ Tkinter-discuss mailing list [email protected] https://mail.python.org/mailman/listinfo/tkinter-discuss