X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f80ea77b4a8bac4ab005bfc592f9cd3262ffa397..54a6974c51b533d398bfc13f06cf5e26f13866c1:/src/xrc/xh_text.cpp diff --git a/src/xrc/xh_text.cpp b/src/xrc/xh_text.cpp index 19bbd601c8..7adc43d65a 100644 --- a/src/xrc/xh_text.cpp +++ b/src/xrc/xh_text.cpp @@ -8,10 +8,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "xh_text.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -19,6 +15,8 @@ #pragma hdrstop #endif +#if wxUSE_XRC + #include "wx/xrc/xh_text.h" #include "wx/textctrl.h" @@ -61,6 +59,9 @@ wxObject *wxTextCtrlXmlHandler::DoCreateResource() SetupWindow(text); + if (HasParam(wxT("maxlength"))) + text->SetMaxLength(GetLong(wxT("maxlength"))); + return text; } @@ -68,3 +69,5 @@ bool wxTextCtrlXmlHandler::CanHandle(wxXmlNode *node) { return IsOfClass(node, wxT("wxTextCtrl")); } + +#endif // wxUSE_XRC