Allow empty message in wxRearrangeDialog.
If the message is empty, don't reserve space for it at the top; instead, just make the dialog a bit smaller. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -285,8 +285,19 @@ bool wxRearrangeDialog::Create(wxWindow *parent,
|
|||||||
// notice that the items in this sizer should be inserted accordingly to
|
// notice that the items in this sizer should be inserted accordingly to
|
||||||
// wxRearrangeDialogSizerPositions order
|
// wxRearrangeDialogSizerPositions order
|
||||||
wxSizer * const sizerTop = new wxBoxSizer(wxVERTICAL);
|
wxSizer * const sizerTop = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
||||||
|
if ( !message.empty() )
|
||||||
|
{
|
||||||
sizerTop->Add(new wxStaticText(this, wxID_ANY, message),
|
sizerTop->Add(new wxStaticText(this, wxID_ANY, message),
|
||||||
wxSizerFlags().Border());
|
wxSizerFlags().Border());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// for convenience of other wxRearrangeDialog code that depends on
|
||||||
|
// positions of sizer items, insert a dummy zero-sized item
|
||||||
|
sizerTop->AddSpacer(0);
|
||||||
|
}
|
||||||
|
|
||||||
sizerTop->Add(m_ctrl,
|
sizerTop->Add(m_ctrl,
|
||||||
wxSizerFlags(1).Expand().Border());
|
wxSizerFlags(1).Expand().Border());
|
||||||
sizerTop->Add(CreateSeparatedButtonSizer(wxOK | wxCANCEL),
|
sizerTop->Add(CreateSeparatedButtonSizer(wxOK | wxCANCEL),
|
||||||
|
Reference in New Issue
Block a user