]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xml/xh_text.cpp
Removed 'interface' pragma for gcc 2.96
[wxWidgets.git] / contrib / src / xml / xh_text.cpp
index 8775d86cdfd4951c7467dfd42bf18064de93e92b..59d9ba87b1fe79d19012596bce458c66a5032646 100644 (file)
@@ -30,6 +30,7 @@ wxTextCtrlXmlHandler::wxTextCtrlXmlHandler() : wxXmlResourceHandler()
     ADD_STYLE(wxTE_PASSWORD);
     ADD_STYLE(wxTE_READONLY);
     ADD_STYLE(wxHSCROLL);
+    AddWindowStyles();
 }
 
 wxObject *wxTextCtrlXmlHandler::DoCreateResource()
@@ -39,8 +40,8 @@ wxObject *wxTextCtrlXmlHandler::DoCreateResource()
                                     GetText(_T("value")),
                                     GetPosition(), GetSize(),
                                     GetStyle(),
-                                                                       wxDefaultValidator,
-                                    GetText(_T("name"))
+                                    wxDefaultValidator,
+                                    GetName()
                                     );
     SetupWindow(text);
     
@@ -51,7 +52,7 @@ wxObject *wxTextCtrlXmlHandler::DoCreateResource()
 
 bool wxTextCtrlXmlHandler::CanHandle(wxXmlNode *node)
 {
-    return node->GetName() == _T("textctrl");
+    return IsOfClass(node, _T("wxTextCtrl"));
 }