From d1cc09bb6f0c0a75ab84ec147ba41f84d979766b Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 12 Sep 2003 21:38:41 +0000 Subject: [PATCH] The unknown control container should always have the wxTAB_TRAVERSAL and wxNO_BORDER styles git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23552 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/xrc/xh_unkwn.cpp | 9 +++++---- src/xrc/xh_unkwn.cpp | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/contrib/src/xrc/xh_unkwn.cpp b/contrib/src/xrc/xh_unkwn.cpp index 388fb040c3..4ff1733125 100644 --- a/contrib/src/xrc/xh_unkwn.cpp +++ b/contrib/src/xrc/xh_unkwn.cpp @@ -34,8 +34,10 @@ public: wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxTAB_TRAVERSAL | wxNO_BORDER) - : wxPanel(parent, id, pos, size, style, + long style = 0) + // Always add the wxTAB_TRAVERSAL and wxNO_BORDER styles to what comes + // from the XRC if anything. + : wxPanel(parent, id, pos, size, style | wxTAB_TRAVERSAL | wxNO_BORDER, controlName + wxT("_container")), m_controlName(controlName), m_controlAdded(false) { @@ -92,8 +94,7 @@ wxObject *wxUnknownWidgetXmlHandler::DoCreateResource() new wxUnknownControlContainer(m_parentAsWindow, GetName(), -1, GetPosition(), GetSize(), - GetStyle(wxT("style"), - wxTAB_TRAVERSAL | wxNO_BORDER)); + GetStyle(wxT("style"))); SetupWindow(panel); return panel; } diff --git a/src/xrc/xh_unkwn.cpp b/src/xrc/xh_unkwn.cpp index 388fb040c3..4ff1733125 100644 --- a/src/xrc/xh_unkwn.cpp +++ b/src/xrc/xh_unkwn.cpp @@ -34,8 +34,10 @@ public: wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxTAB_TRAVERSAL | wxNO_BORDER) - : wxPanel(parent, id, pos, size, style, + long style = 0) + // Always add the wxTAB_TRAVERSAL and wxNO_BORDER styles to what comes + // from the XRC if anything. + : wxPanel(parent, id, pos, size, style | wxTAB_TRAVERSAL | wxNO_BORDER, controlName + wxT("_container")), m_controlName(controlName), m_controlAdded(false) { @@ -92,8 +94,7 @@ wxObject *wxUnknownWidgetXmlHandler::DoCreateResource() new wxUnknownControlContainer(m_parentAsWindow, GetName(), -1, GetPosition(), GetSize(), - GetStyle(wxT("style"), - wxTAB_TRAVERSAL | wxNO_BORDER)); + GetStyle(wxT("style"))); SetupWindow(panel); return panel; } -- 2.45.2