X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2d1e63c0a52861df231829cd5741f151d5672cd0..14619f10b0bdb630206607abd0ce0319d45e095a:/samples/widgets/textctrl.cpp diff --git a/samples/widgets/textctrl.cpp b/samples/widgets/textctrl.cpp index 4eebb91f70..c69f23d0b5 100644 --- a/samples/widgets/textctrl.cpp +++ b/samples/widgets/textctrl.cpp @@ -6,7 +6,7 @@ // Created: 27.03.01 // Id: $Id$ // Copyright: (c) 2001 Vadim Zeitlin -// License: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -171,6 +171,7 @@ protected: void OnText(wxCommandEvent& event); void OnTextEnter(wxCommandEvent& event); + void OnTextPasted(wxClipboardTextEvent& event); void OnCheckOrRadioBox(wxCommandEvent& event); @@ -326,6 +327,7 @@ BEGIN_EVENT_TABLE(TextWidgetsPage, WidgetsPage) EVT_TEXT(TextPage_Textctrl, TextWidgetsPage::OnText) EVT_TEXT_ENTER(TextPage_Textctrl, TextWidgetsPage::OnTextEnter) + EVT_TEXT_PASTE(TextPage_Textctrl, TextWidgetsPage::OnTextPasted) EVT_CHECKBOX(wxID_ANY, TextWidgetsPage::OnCheckOrRadioBox) EVT_RADIOBOX(wxID_ANY, TextWidgetsPage::OnCheckOrRadioBox) @@ -921,6 +923,12 @@ void TextWidgetsPage::OnTextEnter(wxCommandEvent& event) event.Skip(); } +void TextWidgetsPage::OnTextPasted(wxClipboardTextEvent& event) +{ + wxLogMessage("Text pasted from clipboard."); + event.Skip(); +} + void TextWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event)) { CreateText();