Table Click Events
In relerase 4.48.0 a new parameter was added for all those Table Element fans out there.
The boolean parameter enable_click_events
in the Table element enables clicks of individual cells and the table headers to be detected and returned to you. This is exactly what's needed if you want to sort your table by columns for example.
This example code can also be found in the Demo Programs section on the PySimpleGUI GitHub at http://demos.PySimpleGUI.org
The Demo Program is named Demo_Table_Element_Header_or_Cell_Clicks.py
Here's the demo code ready for you to run. Try clicking on the Column Headers to sort by that column.
500