]> git.saurik.com Git - wxWidgets.git/blobdiff - demos/life/dialogs.cpp
No changes, just use "@since 3.0" consistently in the documentation.
[wxWidgets.git] / demos / life / dialogs.cpp
index 36e98059a7d70c7b6a767e268a104e8797b9826f..daa8e72c6bde9692cdbdabd8353061e727b5916f 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Guillermo Rodriguez Garcia, <guille@iies.es>
 // Modified by:
 // Created:     Jan/2000
-// RCS-ID:      $Id$
 // Copyright:   (c) 2000, Guillermo Rodriguez Garcia
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -129,15 +128,10 @@ LifeSamplesDialog::LifeSamplesDialog(wxWindow *parent)
 #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
@@ -202,15 +196,10 @@ XLife is (c) 1989 by Jon Bennett et al.")),
                                   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