]> git.saurik.com Git - wxWidgets.git/commitdiff
Do the right thing for Smartphone if creating button sizer
authorJulian Smart <julian@anthemion.co.uk>
Tue, 22 Mar 2005 10:34:35 +0000 (10:34 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 22 Mar 2005 10:34:35 +0000 (10:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/dlgcmn.cpp

index d7be904875c160d755680fa2689b2e54951b3608..d32ba913182e804ea8a668f94742aace6d0b6afb 100644 (file)
@@ -171,7 +171,28 @@ wxSizer *wxDialogBase::CreateTextSizer( const wxString& message )
 
 wxSizer *wxDialogBase::CreateButtonSizer( long flags )
 {
+#ifdef __SMARTPHONE__
+    wxDialog* dialog = (wxDialog*) this;
+    if (flags & wxOK){
+        dialog->SetLeftMenu(wxID_OK);
+    }
+
+    if (flags & wxCANCEL){
+        dialog->SetRightMenu(wxID_CANCEL);
+    }
+
+    if (flags & wxYES){
+        dialog->SetLeftMenu(wxID_YES);
+    }
+
+    if (flags & wxNO){
+        dialog->SetLeftMenu(wxID_NO);
+    }
+    wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
+    return sizer;
+#else
     return CreateStdDialogButtonSizer( flags );
+#endif
 }
 
 wxStdDialogButtonSizer *wxDialogBase::CreateStdDialogButtonSizer( long flags )