Merge pull request #385 from MikeTheWatchGuy/Dev-latest

Fix for background and text color in Tables
This commit is contained in:
MikeTheWatchGuy 2018-09-29 23:26:02 -04:00 committed by GitHub
commit 81b6013b73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -3401,7 +3401,9 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form):
value = [i] + value value = [i] + value
id = treeview.insert('', 'end', text=value, values=value) id = treeview.insert('', 'end', text=value, values=value)
if element.BackgroundColor is not None and element.BackgroundColor != COLOR_SYSTEM_DEFAULT: if element.BackgroundColor is not None and element.BackgroundColor != COLOR_SYSTEM_DEFAULT:
element.TKTreeview.configure(background=element.BackgroundColor) ttk.Style().configure("Treeview", background=element.BackgroundColor, fieldbackground=element.BackgroundColor)
if element.TextColor is not None and element.TextColor != COLOR_SYSTEM_DEFAULT:
ttk.Style().configure("Treeview", foreground=element.TextColor)
# scrollable_frame.pack(side=tk.LEFT, padx=element.Pad[0], pady=element.Pad[1], expand=True, fill='both') # scrollable_frame.pack(side=tk.LEFT, padx=element.Pad[0], pady=element.Pad[1], expand=True, fill='both')
element.TKTreeview.pack(side=tk.LEFT,expand=True, padx=0, pady=0, fill='both') element.TKTreeview.pack(side=tk.LEFT,expand=True, padx=0, pady=0, fill='both')
if element.Tooltip is not None: if element.Tooltip is not None: