#endif // wxUSE_STATLINE
sizer3->Add( sizer2, 1, wxGROW | wxALL, 5 );
- wxSizer *buttonSizer = CreateButtonSizer( wxOK|wxCANCEL , true, 10 );
- if(buttonSizer->GetChildren().GetCount() > 0 )
+ wxSizer *sizerBtns = CreateButtonSizer(wxOK|wxCANCEL);
+ if ( sizerBtns )
{
- sizer3->Add( buttonSizer, 0, wxEXPAND | wxALL, 10 );
- }
- else
- {
- sizer3->AddSpacer( 10 );
- delete buttonSizer;
+ sizer3->Add(sizerBtns, wxSizerFlags().Expand().Border());
}
// activate
0, wxCENTRE | wxRIGHT|wxLEFT|wxTOP, 20 );
// buttons if any
- wxSizer *buttonSizer = CreateButtonSizer( wxOK , true, 10 );
- if(buttonSizer->GetChildren().GetCount() > 0 )
- {
- sizer->Add( buttonSizer, 0, wxEXPAND | wxALL, 10 );
- }
- else
+ wxSizer *sizerBtns = CreateButtonSizer(wxOK);
+ if ( sizerBtns )
{
- sizer->AddSpacer( 20 );
- delete buttonSizer;
+ sizer->Add(sizerBtns, wxSizerFlags().Expand().Border());
}
// activate