X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..90e10cd1bedc5cac1ce1b5331d6fd2a351014cfa:/src/xrc/xh_unkwn.cpp?ds=sidebyside diff --git a/src/xrc/xh_unkwn.cpp b/src/xrc/xh_unkwn.cpp index c60fd51170..e399ce9205 100644 --- a/src/xrc/xh_unkwn.cpp +++ b/src/xrc/xh_unkwn.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: xh_unkwn.cpp +// Name: src/xrc/xh_unkwn.cpp // Purpose: XRC resource for unknown widget // Author: Vaclav Slavik // Created: 2000/09/09 @@ -18,10 +18,13 @@ #if wxUSE_XRC #include "wx/xrc/xh_unkwn.h" -#include "wx/window.h" -#include "wx/log.h" -#include "wx/sizer.h" -#include "wx/panel.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/window.h" + #include "wx/panel.h" + #include "wx/sizer.h" +#endif class wxUnknownControlContainer : public wxPanel @@ -65,8 +68,7 @@ void wxUnknownControlContainer::AddChild(wxWindowBase *child) wxSizer *sizer = new wxBoxSizer(wxHORIZONTAL); sizer->Add((wxWindow*)child, 1, wxEXPAND); - SetSizer(sizer); - Layout(); + SetSizerAndFit(sizer); } void wxUnknownControlContainer::RemoveChild(wxWindowBase *child) @@ -88,7 +90,7 @@ wxUnknownWidgetXmlHandler::wxUnknownWidgetXmlHandler() wxObject *wxUnknownWidgetXmlHandler::DoCreateResource() { wxASSERT_MSG( m_instance == NULL, - _T("'unknown' controls can't be subclassed, use wxXmlResource::AttachUnknownControl") ); + wxT("'unknown' controls can't be subclassed, use wxXmlResource::AttachUnknownControl") ); wxPanel *panel = new wxUnknownControlContainer(m_parentAsWindow,