]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_text.cpp
Include wx/dcclient.h according to precompiled headers of wx/wx.h (with other minor...
[wxWidgets.git] / src / xrc / xh_text.cpp
index 550c9e43f691fd8084db81a01f2ce5903926728f..fa824f48cbbfce3f84d5c611f26fb5e632f82751 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        xh_text.cpp
+// Name:        src/xrc/xh_text.cpp
 // Purpose:     XRC resource for wxTextCtrl
 // Author:      Aleksandras Gluchovas
 // Created:     2000/03/21
@@ -8,10 +8,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "xh_text.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -44,7 +40,10 @@ wxTextCtrlXmlHandler::wxTextCtrlXmlHandler() : wxXmlResourceHandler()
     XRC_ADD_STYLE(wxTE_CENTRE);
     XRC_ADD_STYLE(wxTE_RIGHT);
     XRC_ADD_STYLE(wxTE_DONTWRAP);
+#if WXWIN_COMPATIBILITY_2_6
     XRC_ADD_STYLE(wxTE_LINEWRAP);
+#endif // WXWIN_COMPATIBILITY_2_6
+    XRC_ADD_STYLE(wxTE_CHARWRAP);
     XRC_ADD_STYLE(wxTE_WORDWRAP);
     AddWindowStyles();
 }
@@ -63,6 +62,9 @@ wxObject *wxTextCtrlXmlHandler::DoCreateResource()
 
     SetupWindow(text);
 
+    if (HasParam(wxT("maxlength")))
+        text->SetMaxLength(GetLong(wxT("maxlength")));
+
     return text;
 }