From: Julian Smart Date: Tue, 22 Mar 2005 10:34:35 +0000 (+0000) Subject: Do the right thing for Smartphone if creating button sizer X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/102c0454649d2fb30be1156fd5fe1b1ea879023b Do the right thing for Smartphone if creating button sizer git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/dlgcmn.cpp b/src/common/dlgcmn.cpp index d7be904875..d32ba91318 100644 --- a/src/common/dlgcmn.cpp +++ b/src/common/dlgcmn.cpp @@ -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 )