Allow processing Enter and Tab in wxGridCellNumberEditor

Add style flags to allow Tab and Enter works properly for the grid number
efitor with ranges (which uses wxSpinCtrl).
This commit is contained in:
Ilya Sinitsyn
2019-10-03 00:56:40 +07:00
committed by Vadim Zeitlin
parent 8dadc2e68c
commit f2286fc200

View File

@@ -683,10 +683,14 @@ void wxGridCellNumberEditor::Create(wxWindow* parent,
#if wxUSE_SPINCTRL
if ( HasRange() )
{
long style = wxSP_ARROW_KEYS |
wxTE_PROCESS_ENTER |
wxTE_PROCESS_TAB;
// create a spin ctrl
m_control = new wxSpinCtrl(parent, wxID_ANY, wxEmptyString,
wxDefaultPosition, wxDefaultSize,
wxSP_ARROW_KEYS,
style,
m_min, m_max);
wxGridCellEditor::Create(parent, id, evtHandler);