Hi,
Is there a way to deny deselection of the row? If I click on empty area of the control, then selected row will be deselected, but I need at lease one row to be selected. So the question ho to disable deselection and in case of clicking on empty area of the control just do nothing?
I tried to handle wxEVT_DATAVIEW_SELECTION_CHANGED event, but there is no way to get previously selected row.
The only variant I see is to store selected row index as a class member and update it on every successful wxEVT_DATAVIEW_SELECTION_CHANGED event.
But may be there is a way to do it with native wxDataViewListCtrl methods or properties.
Thanks.
Deny rows deselection in wxDataViewListCtrl Topic is solved
-
- Earned some good credits
- Posts: 107
- Joined: Tue Aug 28, 2018 1:02 pm
- Location: Belarus
Re: Deny rows deselection in wxDataViewListCtrl
I think that's the only way to do it.The only variant I see is to store selected row index as a class member and update it on every successful wxEVT_DATAVIEW_SELECTION_CHANGED event.
Use the source, Luke!
-
- Earned some good credits
- Posts: 107
- Joined: Tue Aug 28, 2018 1:02 pm
- Location: Belarus
Re: Deny rows deselection in wxDataViewListCtrl
Thank you. Will implement this solution.