]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/textctrl.cpp
reset the dirty flag before generating the event from SetValue() in case the text...
[wxWidgets.git] / samples / widgets / textctrl.cpp
index c3b4392181b59579093c3ffb4757934896b807ff..6fd19a54978ad12bb95734197e38c28b69e15c33 100644 (file)
@@ -136,6 +136,7 @@ public:
     virtual ~TextWidgetsPage(){};
 
     virtual wxControl *GetWidget() const { return m_text; }
+    virtual void RecreateWidget() { CreateText(); }
 
 protected:
     // create an info text contorl
@@ -599,7 +600,7 @@ void TextWidgetsPage::Reset()
 
 void TextWidgetsPage::CreateText()
 {
-    int flags = 0;
+    int flags = ms_defaultFlags;
     switch ( m_radioTextLines->GetSelection() )
     {
         default:
@@ -633,7 +634,7 @@ void TextWidgetsPage::CreateText()
             break;
 
         case WrapStyle_Char:
-            flags |= wxTE_LINEWRAP;
+            flags |= wxTE_CHARWRAP;
             break;
 
         case WrapStyle_Best: