X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2de58153dbd5684d9ac0d2d72c7ceaceeec2c1ea..89b3361ec25cf1e6d255b14c7633d8375646e4fb:/samples/widgets/combobox.cpp diff --git a/samples/widgets/combobox.cpp b/samples/widgets/combobox.cpp index a36f3a0085..23fd516a01 100644 --- a/samples/widgets/combobox.cpp +++ b/samples/widgets/combobox.cpp @@ -124,6 +124,7 @@ protected: void OnCloseup(wxCommandEvent& event); void OnComboBox(wxCommandEvent& event); void OnComboText(wxCommandEvent& event); + void OnComboTextPasted(wxClipboardTextEvent& event); void OnCheckOrRadioBox(wxCommandEvent& event); @@ -215,6 +216,7 @@ BEGIN_EVENT_TABLE(ComboboxWidgetsPage, WidgetsPage) EVT_COMBOBOX_CLOSEUP(ComboPage_Combo, ComboboxWidgetsPage::OnCloseup) EVT_TEXT(ComboPage_Combo, ComboboxWidgetsPage::OnComboText) EVT_TEXT_ENTER(ComboPage_Combo, ComboboxWidgetsPage::OnComboText) + EVT_TEXT_PASTE(ComboPage_Combo, ComboboxWidgetsPage::OnComboTextPasted) EVT_CHECKBOX(wxID_ANY, ComboboxWidgetsPage::OnCheckOrRadioBox) EVT_RADIOBOX(wxID_ANY, ComboboxWidgetsPage::OnCheckOrRadioBox) @@ -662,6 +664,12 @@ void ComboboxWidgetsPage::OnComboText(wxCommandEvent& event) } } +void ComboboxWidgetsPage::OnComboTextPasted(wxClipboardTextEvent& event) +{ + wxLogMessage("Text pasted from clipboard."); + event.Skip(); +} + void ComboboxWidgetsPage::OnComboBox(wxCommandEvent& event) { long sel = event.GetInt();