]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/msgdlgg.cpp
Fixed doubled-up key effects in wxTextCtrl by resetting m_lastMsg to 0
[wxWidgets.git] / src / generic / msgdlgg.cpp
index 012e68df9ebd0eaec3550178a18a6f7888e7cee6..9ad504ce9411ac20a32a1880e1dd936a44e435a8 100644 (file)
@@ -111,6 +111,7 @@ wxGenericMessageDialog::wxGenericMessageDialog(wxWindow *parent, const wxString&
 
     wxRowColSizer *buttonSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS);
     buttonSizer->SetName("buttonSizer");
+    buttonSizer->SetSpacing(12,0);
 
     // Specify constraints for the button sizer
     wxLayoutConstraints *c = new wxLayoutConstraints;
@@ -126,20 +127,20 @@ wxGenericMessageDialog::wxGenericMessageDialog(wxWindow *parent, const wxString&
     wxButton *no = (wxButton *) NULL;
 
     if (style & wxYES_NO) {
-       yes = new wxButton(this, wxID_YES, _("Yes"));
-       no = new wxButton(this, wxID_NO, _("No"));
+       yes = new wxButton(this, wxID_YES, _("Yes"), wxDefaultPosition, wxSize(75,-1) );
+       no = new wxButton(this, wxID_NO, _("No"), wxDefaultPosition, wxSize(75,-1) );
 
        buttonSizer->AddSizerChild(yes);
        buttonSizer->AddSizerChild(no);
     }
 
     if (style & wxOK) {
-        ok = new wxButton(this, wxID_OK, _("OK"));
+        ok = new wxButton(this, wxID_OK, _("OK"), wxDefaultPosition, wxSize(75,-1) );
         buttonSizer->AddSizerChild(ok);
     }
 
     if (style & wxCANCEL) {
-        cancel = new wxButton(this, wxID_CANCEL, _("Cancel"));
+        cancel = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(75,-1) );
         buttonSizer->AddSizerChild(cancel);
     }
 
@@ -179,28 +180,3 @@ void wxGenericMessageDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
 }
 
 
-int wxMessageBox(const wxString& message, const wxString& caption, long style,
-                 wxWindow *parent, int WXUNUSED(x), int WXUNUSED(y) )
-{
-    wxMessageDialog dialog(parent, message, caption, style);
-
-    int ans = dialog.ShowModal();
-    switch ( ans )
-    {
-        case wxID_OK:
-            return wxOK;
-            break;
-        case wxID_YES:
-            return wxYES;
-            break;
-        case wxID_NO:
-            return wxNO;
-            break;
-        default:
-        case wxID_CANCEL:
-            return wxCANCEL;
-            break;
-    }
-    return ans;
-}
-