- // 3) static line
- topsizer->Add( new wxStaticLine( this, wxID_ANY ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10 );
-
- // 4) buttons
- topsizer->Add( CreateButtonSizer( style & (wxOK|wxCANCEL|wxYES_NO|wxYES_DEFAULT|wxNO_DEFAULT) ),
- 0, wxCENTRE | wxALL, 10 );
+ // 3) buttons
+ int center_flag = wxEXPAND;
+ if (m_dialogStyle & wxYES_NO)
+ center_flag = wxALIGN_CENTRE;
+ wxSizer *sizerBtn = CreateSeparatedButtonSizer(m_dialogStyle & ButtonSizerFlags);
+ if ( sizerBtn )
+ topsizer->Add(sizerBtn, 0, center_flag | wxALL, 10 );