Add support for empty call size to wxGridBagSizer XRC handler
Add empty_cellsize property. Closes #22541.
This commit is contained in:
parent
a0bdcc0d0f
commit
09b2488577
@ -2749,6 +2749,9 @@ support the following properties:
|
||||
optionally the proportion can be appended after each number
|
||||
separated by a @c :
|
||||
(default: none).}
|
||||
@row3col{empty_cellsize, @ref overview_xrcformat_type_size,
|
||||
Size used for cells in the grid with no item. (default: @c wxDefaultSize).
|
||||
@since 3.2.0}
|
||||
@endTable
|
||||
|
||||
@subsection overview_xrcformat_wxwrapsizer wxWrapSizer
|
||||
|
@ -2054,6 +2054,7 @@ wxGridBagSizer =
|
||||
"wxFLEX_GROWMODE_ALL") }* &
|
||||
[xrc:p="o"] element growablerows {_, t_list_of_numbers_with_weights }* &
|
||||
[xrc:p="o"] element growablecols {_, t_list_of_numbers_with_weights }* &
|
||||
[xrc:p="o"] element empty_cellsize {_, t_size }* &
|
||||
(wxSizerGB_item | objectRef)*
|
||||
}
|
||||
|
||||
|
@ -253,6 +253,13 @@ wxObject* wxSizerXmlHandler::Handle_sizer()
|
||||
m_isInside = true;
|
||||
m_isGBS = (m_class == wxT("wxGridBagSizer"));
|
||||
|
||||
if (m_isGBS)
|
||||
{
|
||||
wxSize cellsize = GetSize(wxT("empty_cellsize"));
|
||||
if (cellsize != wxDefaultSize)
|
||||
static_cast<wxGridBagSizer*>(sizer)->SetEmptyCellSize(cellsize);
|
||||
}
|
||||
|
||||
wxObject* parent = m_parent;
|
||||
#if wxUSE_STATBOX
|
||||
// wxStaticBoxSizer's child controls should be parented by the box itself,
|
||||
|
Loading…
Reference in New Issue
Block a user