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:
committed by
Vadim Zeitlin
parent
8dadc2e68c
commit
f2286fc200
@@ -683,10 +683,14 @@ void wxGridCellNumberEditor::Create(wxWindow* parent,
|
|||||||
#if wxUSE_SPINCTRL
|
#if wxUSE_SPINCTRL
|
||||||
if ( HasRange() )
|
if ( HasRange() )
|
||||||
{
|
{
|
||||||
|
long style = wxSP_ARROW_KEYS |
|
||||||
|
wxTE_PROCESS_ENTER |
|
||||||
|
wxTE_PROCESS_TAB;
|
||||||
|
|
||||||
// create a spin ctrl
|
// create a spin ctrl
|
||||||
m_control = new wxSpinCtrl(parent, wxID_ANY, wxEmptyString,
|
m_control = new wxSpinCtrl(parent, wxID_ANY, wxEmptyString,
|
||||||
wxDefaultPosition, wxDefaultSize,
|
wxDefaultPosition, wxDefaultSize,
|
||||||
wxSP_ARROW_KEYS,
|
style,
|
||||||
m_min, m_max);
|
m_min, m_max);
|
||||||
|
|
||||||
wxGridCellEditor::Create(parent, id, evtHandler);
|
wxGridCellEditor::Create(parent, id, evtHandler);
|
||||||
|
Reference in New Issue
Block a user