ListBox.HeaderPressed
From Xojo Documentation
Event
Runs after a ListBox header has been clicked/pressed. The index on Column is zero-based. You can use this event to specify whether you want to sort the column that was pressed. If you return True, the column is not sorted and it does not update the SortedColumn property.