Made Table Element Header mouse-over and clicked be the inverse of the normal header colors. Makes for a much nicer experience

This commit is contained in:
PySimpleGUI 2023-08-28 07:09:38 -04:00
parent 0b6eb6d5b3
commit 0459adac69
1 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/python3 #!/usr/bin/python3
version = __version__ = "4.61.0.196 Unreleased" version = __version__ = "4.61.0.197 Unreleased"
_change_log = """ _change_log = """
Changelog since 4.60.0 released to PyPI on 8-May-2022 Changelog since 4.60.0 released to PyPI on 8-May-2022
@ -464,6 +464,8 @@ _change_log = """
New Udemy Coupon New Udemy Coupon
4.61.0.196 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 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) table_style.configure(style_name, font=font)
if element.BorderWidth is not None: if element.BorderWidth is not None:
table_style.configure(style_name, borderwidth=element.BorderWidth) 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) treeview.configure(style=style_name)
# scrollable_frame.pack(side=tk.LEFT, padx=elementpad[0], pady=elementpad[1], expand=True, fill='both') # scrollable_frame.pack(side=tk.LEFT, padx=elementpad[0], pady=elementpad[1], expand=True, fill='both')
if element.enable_click_events is True: if element.enable_click_events is True: