Merge pull request #6436 from PySimpleGUI/Dev-latest
Changed Table click events to be generated on Button Release instead …
This commit is contained in:
commit
76e4071239
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
|
|
||||||
version = __version__ = "4.61.0.188 Unreleased"
|
version = __version__ = "4.61.0.189 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
|
||||||
|
@ -446,6 +446,9 @@ _change_log = """
|
||||||
Corrected the Table.get docstring to reflect that it returns a list of ints
|
Corrected the Table.get docstring to reflect that it returns a list of ints
|
||||||
4.61.0.188
|
4.61.0.188
|
||||||
Finished correcting the Table.get docstring.... think I got it right this time....
|
Finished correcting the Table.get docstring.... think I got it right this time....
|
||||||
|
4.61.0.189
|
||||||
|
Changed Table click events to be generated on Button Release instead of Button (down). Was not getting the
|
||||||
|
correct selected rows in the values dictionary when the click event was generated using down. Now the selected rows is correct
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -9566,7 +9569,7 @@ class Table(Element):
|
||||||
self.TKTreeview.selection_set(selections)
|
self.TKTreeview.selection_set(selections)
|
||||||
# print(selections)
|
# print(selections)
|
||||||
self.SelectedRows = [int(x) - 1 for x in selections]
|
self.SelectedRows = [int(x) - 1 for x in selections]
|
||||||
# print('The new selected rows = ', self.SelectedRows)
|
# print('The new selected rows = ', self.SelectedRows, 'selections =', selections)
|
||||||
if self.enable_click_events is True:
|
if self.enable_click_events is True:
|
||||||
if self.Key is not None:
|
if self.Key is not None:
|
||||||
self.ParentForm.LastButtonClicked = (self.Key, TABLE_CLICKED_INDICATOR, (row, column))
|
self.ParentForm.LastButtonClicked = (self.Key, TABLE_CLICKED_INDICATOR, (row, column))
|
||||||
|
@ -17767,7 +17770,7 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form):
|
||||||
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:
|
||||||
treeview.bind('<Button-1>', element._table_clicked)
|
treeview.bind('<ButtonRelease-1>', element._table_clicked)
|
||||||
if element.right_click_selects:
|
if element.right_click_selects:
|
||||||
if running_mac():
|
if running_mac():
|
||||||
treeview.bind('<Button-2>', element._table_clicked)
|
treeview.bind('<Button-2>', element._table_clicked)
|
||||||
|
|
Loading…
Reference in New Issue