Open jmaglic opened 3 years ago
It's a good idea. We should first check if such options are already present in wxWidgets. In such case, it could be very simple to implement this feature.
There appears to be not built-in way to sort but there is a sorting event thrown by wxGrid. So it would be possible to handle the event and draw up a sorted grid in the event function. https://stackoverflow.com/questions/14048043/how-do-i-handle-the-wxevt-grid-col-sort-event-to-sort-a-grid
Current status
The cavity table outputs cavities ordered by volume.
Issue
The user may be interested in features other than the cavity volume, such as surface or what type of cavity it is (after #88 has been implemented).
Proposed change
Add the ability to sort the table by any column, by clicking on the corresponding header cell. Since we have unicode support we can add a symbols ▼ and ▲ to the header cells to give an indication of how the list will be sorted when the header cell is clicked.