Merge pull request #1708 from PySimpleGUI/Dev-latest

Added correct handling of foreground color for tables (text color) wh…
This commit is contained in:
MikeTheWatchGuy 2019-07-19 22:31:13 -04:00 committed by GitHub
commit b23361bd43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -4428,7 +4428,12 @@ class Table(Element):
if self.BackgroundColor is not None and self.BackgroundColor != COLOR_SYSTEM_DEFAULT:
self.TKTreeview.tag_configure(id, background=self.BackgroundColor)
else:
self.TKTreeview.tag_configure(id, background='#FFFFFF')
self.TKTreeview.tag_configure(id, background='#FFFFFF', foreground='#000000')
if self.TextColor is not None and self.TextColor != COLOR_SYSTEM_DEFAULT:
self.TKTreeview.tag_configure(id, foreground=self.TextColor)
else:
self.TKTreeview.tag_configure(id, foreground='#000000')
children = self.TKTreeview.get_children()
for i in children:
self.TKTreeview.detach(i)