X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9f01cb2918790cb28f3ca799d885e8a22ad1c2ea..638357a03eced5cc1ecb9f79f8ad3f03f465c889:/src/xrc/xh_unkwn.cpp diff --git a/src/xrc/xh_unkwn.cpp b/src/xrc/xh_unkwn.cpp index cad645b68b..f9b5648036 100644 --- a/src/xrc/xh_unkwn.cpp +++ b/src/xrc/xh_unkwn.cpp @@ -19,6 +19,8 @@ #pragma hdrstop #endif +#if wxUSE_XRC + #include "wx/xrc/xh_unkwn.h" #include "wx/window.h" #include "wx/log.h" @@ -31,7 +33,7 @@ class wxUnknownControlContainer : public wxPanel public: wxUnknownControlContainer(wxWindow *parent, const wxString& controlName, - wxWindowID id = -1, + wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0) @@ -68,7 +70,6 @@ void wxUnknownControlContainer::AddChild(wxWindowBase *child) wxSizer *sizer = new wxBoxSizer(wxHORIZONTAL); sizer->Add((wxWindow*)child, 1, wxEXPAND); SetSizer(sizer); - SetAutoLayout(true); Layout(); } @@ -95,7 +96,7 @@ wxObject *wxUnknownWidgetXmlHandler::DoCreateResource() wxPanel *panel = new wxUnknownControlContainer(m_parentAsWindow, - GetName(), -1, + GetName(), wxID_ANY, GetPosition(), GetSize(), GetStyle(wxT("style"))); SetupWindow(panel); @@ -107,3 +108,4 @@ bool wxUnknownWidgetXmlHandler::CanHandle(wxXmlNode *node) return IsOfClass(node, wxT("unknown")); } +#endif // wxUSE_XRC