4/24/2024 0 Comments Python tkinter treeview hoverforeground [list disabled $colors(-disabledfg) \ background [list disabled $colors(-frame) \ What I am proposing is to remove the entries are necessary, without it the colours for the normal state remain as set in ttk::style configure: I have tested this on Windows and I confirm your findings. I have committed this in the bugfix branch (bug-509cafafae) as. I see no issue with this, and a lot of advantages (the ones you already mentioned). And I think it's an excellent suggestion. If the interface needs to be enhanced for special items, like cells of the tree view, the use of tags should override the base styling.įrom what I have read so far the fix rom cjmcdonald for the regression seems most suitable. The theming engine should layout and style the user interface. My understanding is the same as was written here already. I am the author who requested the change in Thank you all for your participation, and special thanks to cjmcdonald for suggesting the fix. If background compatibility wasn't a concern, then maybe tags could be bound to styles, instead of being bound directly to colors and the like. Whatever the mechanism, being able to style rows differently is a huge boon for me. Best would be you try core-8-6-branch with your application so that we're even more sure of this?īeing able to use a different color for specific rows is very important in the application I'm working on too (a GUI version of this terminal utility - it's for the red entries that show up in show-all mode). I believe the fix we designed for this ticket does not introduce any regression (or rather: removes the regression introduced in 8.6.9). > would be you try core-8-6-branch with your application so that we're even more > any regression (or rather: removes the regression introduced in 8.6.9). I believe the fix we designed for this ticket does not introduce Thanks for your testing time, I appreciate it a lot. Return [elm for elm in style.map("Treeview", query_opt=option) # style.map() returns an empty list for missing options, so this should # Returns the style map for 'option' with any styles starting with Maybe it should check the Tk version too, but I couldn't find anything more exact than "8.6" from some searching around. Tree.tag_configure(i, background='yellow')įor people using Tkinter, here's a workaround based on cjmcdonald's fix. With the latest 3.8.3 version (starting with version 3.7.3), the background is white. It should produce a table with alternating colored rows. Has a fix been released so that it's part of the python 3.8 releases? This simply program demonstrates the problem. We have no control over python releases, nor what version of Tk they include. Wondering if there's a way for users to upgrade tkinter themselves.Ĭhrstphrchvz added on For reference, you can obtain the patchlevel in Tkinter using The release notes for 3.9.0 Beta3 state that for Windows uses 8.6.9.īpo-35402: Update Windows build to use Tcl and Tk 8.6.9 Is it possible to upgrade the windows version of tkinter for 3.7, 3.8? I don't see where 8.6.10 is in the works yet for the python 3.9 releases. Anaconda), or building the Tkinter module yourself against a newer Tcl/Tk. Using a newer Tcl/Tk in Python probably involves obtaining Python from a third-party distribution or package manager which has updated Tcl/Tk to 8.6.10 (e.g. It currently targets 3.9, but there doesn't appear to be any progress made in the past couple of months. would be the Python ticket to watch regarding upgrading the bundled Tcl/Tk to 8.6.10. t tag configure test -background red -foreground yellow The following code puts the background of the item in red and the foreground in yellow with tk 8.6.8 but not with tk 8.6.9 Since I have upgraded to tcl/tk 8.6.9 (in Linux), ttk::treeview tag configure no longer works. Ttk::treeview tag configure not working since upgrade to 8.6.9
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |