From: Vadim Zeitlin Date: Wed, 8 Feb 2006 13:22:56 +0000 (+0000) Subject: added support for tag for toolbars in XRC X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/700dbceb374774f5207a2daf2b7ea69e08bfd56f added support for tag for toolbars in XRC git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/changes.txt b/docs/changes.txt index eb0f8f27a1..f5d6bd9d9a 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -76,7 +76,7 @@ All (GUI): - Added SetSheetStyle to wxPropertySheetDialog and allowed it to behave like a Mac OS X settings dialog. - wxDC::BeginDrawing() and wxDC::EndDrawing() deprecated. -- Added XRC tag for wxToolBar elements +- Added XRC tag for wxToolBar elements and for wxToolBar itself wxMSW: diff --git a/docs/tech/tn0014.txt b/docs/tech/tn0014.txt index 6260226d17..f40c7add34 100644 --- a/docs/tech/tn0014.txt +++ b/docs/tech/tn0014.txt @@ -441,6 +441,7 @@ bitmapsize Size -1,-1 margins Size -1,-1 packing Integer -1 separation Integer -1 +bg Background colour None wxToolBar node may have children and nodes. Their class may be either "tool", "separator" or any wxWidgets class derived from diff --git a/src/xrc/xh_toolb.cpp b/src/xrc/xh_toolb.cpp index ba53f016f0..62dd770716 100644 --- a/src/xrc/xh_toolb.cpp +++ b/src/xrc/xh_toolb.cpp @@ -118,6 +118,8 @@ wxObject *wxToolBarXmlHandler::DoCreateResource() long separation = GetLong(wxT("separation"), -1); if (separation != -1) toolbar->SetToolSeparation(separation); + if (HasParam(wxT("bg"))) + toolbar->SetBackgroundColour(GetColour(wxT("bg"))); wxXmlNode *children_node = GetParamNode(wxT("object")); if (!children_node)