Add support for stretchable spacers to XRC wxToolBar handler.

Notice that currently only stretchable spacers are supported via
separator-like "space" XRC element. If we ever add support for fixed spacers
in the toolbar we should do it via its fixed sub-element, e.g. they would be
specified with <fixed>1</fixed> in XRC file.

Also use spacers instead of separator in the XRC sample and ensure that the
toolbars in it are resized.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-01-18 00:29:00 +00:00
parent ca67f0d859
commit 5852e62f1f
3 changed files with 21 additions and 12 deletions

View File

@@ -1570,7 +1570,9 @@ A toolbar can have one or more child objects of any wxControl-derived class or
one of two pseudo-classes: @c separator or @c tool.
The @c separator pseudo-class is used to insert separators into the toolbar and
has neither properties nor children.
has neither properties nor children. Similarly, the @c space pseudo-class is
used for stretchable spaces (see wxToolBar::AddStretchableSpace(), new since
wxWidgets 2.9.1).
The @c tool pseudo-class objects specify toolbar buttons and have the following
properties:
@@ -1619,6 +1621,7 @@ Example:
<bitmap>bar.png</bitmap>
<label>Bar</label>
</object>
<object class="separator"/>
<object class="tool" name="view_auto">
<bitmap>view.png</bitmap>
<label>View</label>
@@ -1633,7 +1636,7 @@ Example:
</object>
</dropdown>
</object>
<object class="separator"/>
<object class="space"/>
<object class="wxComboBox">
<content>
<item>Just</item>