Added wxRIBBON_PANEL_STRETCH to allow a single panel to stretch to fill the parent page.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2012-03-09 15:26:37 +00:00
parent 14919c7020
commit 8d3d5f067a
3 changed files with 49 additions and 41 deletions

View File

@@ -23,6 +23,7 @@ enum wxRibbonPanelOption
wxRIBBON_PANEL_NO_AUTO_MINIMISE = 1 << 0,
wxRIBBON_PANEL_EXT_BUTTON = 1 << 3,
wxRIBBON_PANEL_MINIMISE_BUTTON = 1 << 4,
wxRIBBON_PANEL_STRETCH = 1 << 5,
wxRIBBON_PANEL_DEFAULT_STYLE = 0
};

View File

@@ -43,6 +43,8 @@
typically combined with wxRIBBON_PANEL_NO_AUTO_MINIMISE to make a
panel which the user always has manual control over when it
minimises.
@style{wxRIBBON_PANEL_STRETCH}
Stretches a single panel to fit the parent page.
@endStyleTable
@library{wxribbon}

View File

@@ -303,7 +303,12 @@ bool wxRibbonPanel::IsSizingContinuous() const
{
// A panel never sizes continuously, even if all of its children can,
// as it would appear out of place along side non-continuous panels.
return false;
// JS 2012-03-09: introducing wxRIBBON_PANEL_STRETCH to allow
// the panel to fill its parent page. For example we might have
// a list of styles in one of the pages, which should stretch to
// fill available space.
return (m_flags & wxRIBBON_PANEL_STRETCH) != 0;
}
wxSize wxRibbonPanel::DoGetNextSmallerSize(wxOrientation direction,