]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/textctrl.cpp
Fix return value of wxGenericTreeCtrl::FindItem().
[wxWidgets.git] / samples / widgets / textctrl.cpp
index ee87e1a6af8c60b19e4869a2e11b1134cffacb6d..c69f23d0b5127ace47b82fddca3de58e5093019e 100644 (file)
@@ -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();