]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/dirdlgg.cpp
set string length to 0 in AllocBeforeWrite() just to be tidy (replaces patch 1123226)
[wxWidgets.git] / src / generic / dirdlgg.cpp
index a07fbd497e786483b84db914555cbd552cf51275..327bcbc81e2bf5e872f4a94de3c3166070227e1b 100644 (file)
@@ -190,17 +190,7 @@ wxGenericDirDialog::wxGenericDirDialog(wxWindow* parent, const wxString& title,
 #endif
 
     // 4) Buttons
-    buttonsizer = new wxBoxSizer( wxHORIZONTAL );
-
-    // OK and Cancel button should be at the right bottom
-    wxButton* okButton = new wxButton(this, wxID_OK);
-    buttonsizer->Add( okButton, 0, wxLEFT|wxRIGHT, 10 );
-    wxButton* cancelButton = new wxButton(this, wxID_CANCEL);
-    buttonsizer->Add( cancelButton, 0, wxLEFT|wxRIGHT, 10 );
-
-    topsizer->Add( buttonsizer, 0, wxLEFT|wxTOP|wxBOTTOM | wxALIGN_RIGHT, 10 );
-
-    okButton->SetDefault();
+    topsizer->Add( CreateButtonSizer( wxOK|wxCANCEL ), 0, wxEXPAND | wxALL, 10 );
 
 #endif // !__SMARTPHONE__