]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/text/text.cpp
buttonbar.cpp/.h must be in GUI_CMN_SRC/HDR as toolbkg.cpp which is in common depends...
[wxWidgets.git] / samples / text / text.cpp
index fe76bd993fcb8209d24be9a95ee721be5305e62f..eacc38f47fcfc93c8b24c8428c9514a461a51ace 100644 (file)
@@ -782,15 +782,16 @@ void MyTextCtrl::OnText(wxCommandEvent& event)
         return;
 
     MyTextCtrl *win = (MyTextCtrl *)event.GetEventObject();
+    const wxChar *changeVerb = win->IsModified() ? _T("changed")
+                                                 : _T("set by program");
     const wxChar *data = (const wxChar *)(win->GetClientData());
     if ( data )
     {
-        wxLogMessage(_T("Text changed in control '%s'"), data);
+        wxLogMessage(_T("Text %s in control \"%s\""), changeVerb, data);
     }
     else
     {
-        // wxLogMessage( event.GetString() );
-        wxLogMessage(_T("Text changed in some control"));
+        wxLogMessage(_T("Text %s in some control"), changeVerb);
     }
 }