- sizerTop->Add(new wxStaticText(this, wxID_ANY, message),
- wxSizerFlags().Border());
+
+ if ( !message.empty() )
+ {
+ sizerTop->Add(new wxStaticText(this, wxID_ANY, message),
+ 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);
+ }
+