Support activation in wxGridCellBoolEditor
This makes it much more convenient to use interactively, as the cell value is toggled immediately and, even more importantly, the UI doesn't enter the confusing editing mode which doesn't look any different from the normal grid appearance except for the current cell border absence. Note that we still keep support for classic in-place editing to preserve compatibility with the code which calls EnableCellEditControl() explicitly and expects an editor to be shown, but perhaps we could switch to using only activation in the future.
This commit is contained in:
@@ -238,6 +238,11 @@ class WXDLLIMPEXP_ADV wxGridCellBoolEditor : public wxGridCellEditor
|
||||
public:
|
||||
wxGridCellBoolEditor() { }
|
||||
|
||||
virtual wxGridActivationResult
|
||||
TryActivate(int row, int col, wxGrid* grid,
|
||||
const wxGridActivationSource& actSource) wxOVERRIDE;
|
||||
virtual void DoActivate(int row, int col, wxGrid* grid) wxOVERRIDE;
|
||||
|
||||
virtual void Create(wxWindow* parent,
|
||||
wxWindowID id,
|
||||
wxEvtHandler* evtHandler) wxOVERRIDE;
|
||||
|
Reference in New Issue
Block a user