Merge pull request #6488 from PySimpleGUI/Dev-latest

Made Table Element Header mouse-over and clicked be the inverse of th…
This commit is contained in:
PySimpleGUI 2023-08-28 07:09:54 -04:00 committed by GitHub
commit 9cf9258835
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/python3
version = __version__ = "4.61.0.196 Unreleased"
version = __version__ = "4.61.0.197 Unreleased"
_change_log = """
Changelog since 4.60.0 released to PyPI on 8-May-2022
@ -464,6 +464,8 @@ _change_log = """
New Udemy Coupon
4.61.0.196
Added highlight colors to the set_index_color method. Parms highlight_text_color & highlight_background_color control changing the highlight colors
4.61.0.197
Made Table Element Header mouse-over and clicked be the inverse of the normal header colors. Makes for a much nicer experience
"""
@ -17854,6 +17856,13 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form):
table_style.configure(style_name, font=font)
if element.BorderWidth is not None:
table_style.configure(style_name, borderwidth=element.BorderWidth)
if element.HeaderBackgroundColor not in (None, COLOR_SYSTEM_DEFAULT) and element.HeaderTextColor not in (None, COLOR_SYSTEM_DEFAULT):
table_style.map(style_name + ".Heading", background=[('pressed', '!focus', element.HeaderBackgroundColor),
('active', element.HeaderTextColor),])
table_style.map(style_name + ".Heading", foreground=[('pressed', '!focus', element.HeaderTextColor),
('active', element.HeaderBackgroundColor),])
treeview.configure(style=style_name)
# scrollable_frame.pack(side=tk.LEFT, padx=elementpad[0], pady=elementpad[1], expand=True, fill='both')
if element.enable_click_events is True: