X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8cd6a9ad50c00a94e62558a3b55e814028d81100..b8e57034a25ef17ed439f142a15dacb11bde4489:/samples/widgets/spinbtn.cpp diff --git a/samples/widgets/spinbtn.cpp b/samples/widgets/spinbtn.cpp index 0447d66d65..965b5e6377 100644 --- a/samples/widgets/spinbtn.cpp +++ b/samples/widgets/spinbtn.cpp @@ -100,6 +100,7 @@ protected: void OnSpinCtrl(wxSpinEvent& event); void OnSpinCtrlDouble(wxSpinDoubleEvent& event); void OnSpinText(wxCommandEvent& event); + void OnSpinTextEnter(wxCommandEvent& event); void OnUpdateUIValueButton(wxUpdateUIEvent& event); void OnUpdateUIMinMaxButton(wxUpdateUIEvent& event); @@ -167,6 +168,7 @@ BEGIN_EVENT_TABLE(SpinBtnWidgetsPage, WidgetsPage) EVT_SPINCTRL(SpinBtnPage_SpinCtrl, SpinBtnWidgetsPage::OnSpinCtrl) EVT_SPINCTRLDOUBLE(SpinBtnPage_SpinCtrlDouble, SpinBtnWidgetsPage::OnSpinCtrlDouble) EVT_TEXT(SpinBtnPage_SpinCtrl, SpinBtnWidgetsPage::OnSpinText) + EVT_TEXT_ENTER(SpinBtnPage_SpinCtrl, SpinBtnWidgetsPage::OnSpinTextEnter) EVT_TEXT(SpinBtnPage_SpinCtrlDouble, SpinBtnWidgetsPage::OnSpinText) EVT_CHECKBOX(wxID_ANY, SpinBtnWidgetsPage::OnCheckOrRadioBox) @@ -475,4 +477,10 @@ void SpinBtnWidgetsPage::OnSpinText(wxCommandEvent& event) event.GetString().c_str()); } +void SpinBtnWidgetsPage::OnSpinTextEnter(wxCommandEvent& event) +{ + wxLogMessage("\"Enter\" pressed in spin control, text is \"%s\"", + event.GetString()); +} + #endif // wxUSE_SPINBTN