X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cb7ef329e79d7d5ece580924fde20b347124e421..f239a20092359e3c914adb79bd39f3f5d2b2e06f:/src/generic/spinctlg.cpp diff --git a/src/generic/spinctlg.cpp b/src/generic/spinctlg.cpp index ca2a1bb465..e9a7a32a37 100644 --- a/src/generic/spinctlg.cpp +++ b/src/generic/spinctlg.cpp @@ -85,13 +85,13 @@ public: void OnChar( wxKeyEvent &event ) { if (m_spin) - m_spin->OnTextChar(event); + m_spin->ProcessWindowEvent(event); } void OnKillFocus(wxFocusEvent& event) { if (m_spin) - m_spin->OnTextLostFocus(); + m_spin->ProcessWindowEvent(event); event.Skip(); } @@ -357,6 +357,11 @@ void wxSpinCtrlGenericBase::DoSetToolTip(wxToolTip *tip) // Handle sub controls events // ---------------------------------------------------------------------------- +BEGIN_EVENT_TABLE(wxSpinCtrlGenericBase, wxSpinCtrlBase) + EVT_CHAR(wxSpinCtrlGenericBase::OnTextChar) + EVT_KILL_FOCUS(wxSpinCtrlGenericBase::OnTextLostFocus) +END_EVENT_TABLE() + void wxSpinCtrlGenericBase::OnSpinButton(wxSpinEvent& event) { event.Skip(); @@ -388,10 +393,12 @@ void wxSpinCtrlGenericBase::OnSpinButton(wxSpinEvent& event) DoSendEvent(); } -void wxSpinCtrlGenericBase::OnTextLostFocus() +void wxSpinCtrlGenericBase::OnTextLostFocus(wxFocusEvent& event) { SyncSpinToText(); DoSendEvent(); + + event.Skip(); } void wxSpinCtrlGenericBase::OnTextChar(wxKeyEvent& event)