-
- int w = m_buttons.GetCount() * 100;
- if (message_size.x > w) w = message_size.x;
- int space = w / (m_buttons.GetCount()*2);
-
- int n = 0;
- wxNode *node = m_buttons.First();
- while (node)
+
+ // 2) text
+ icon_text->Add( CreateTextSizer( message ), 0, wxALIGN_CENTER | wxLEFT, 10 );
+
+ topsizer->Add( icon_text, 1, wxCENTER | wxLEFT|wxRIGHT|wxTOP, 10 );
+
+#if wxUSE_STATLINE
+ // 3) static line
+ topsizer->Add( new wxStaticLine( this, wxID_ANY ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10 );
+#endif // wxUSE_STATLINE
+
+ // 4) buttons
+ int center_flag = wxEXPAND;
+ if (style & wxYES_NO) center_flag = wxALIGN_CENTRE;
+ topsizer->Add( CreateButtonSizer( style & (wxOK|wxCANCEL|wxYES_NO|wxYES_DEFAULT|wxNO_DEFAULT) ),
+ 0, center_flag | wxALL, 10 );
+
+ SetAutoLayout( true );
+ SetSizer( topsizer );
+
+ topsizer->SetSizeHints( this );
+ topsizer->Fit( this );
+ wxSize size( GetSize() );
+ if (size.x < size.y*3/2)