From f2286fc200ff329dd75a13597c13506d4d3bbbad Mon Sep 17 00:00:00 2001 From: Ilya Sinitsyn Date: Thu, 3 Oct 2019 00:56:40 +0700 Subject: [PATCH] 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). --- src/generic/grideditors.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/generic/grideditors.cpp b/src/generic/grideditors.cpp index 37d5d48621..c773f68dce 100644 --- a/src/generic/grideditors.cpp +++ b/src/generic/grideditors.cpp @@ -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);