void wxDialogBase::Init()
{
m_returnCode = 0;
-
+ m_affirmativeId = wxID_OK;
+
// the dialogs have this flag on by default to prevent the events from the
// dialog controls from reaching the parent frame which is usually
// undesirable and can lead to unexpected and hard to find bugs
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 )
yes->SetFocus();
}
}
+
+ if (flags & wxOK)
+ SetAffirmativeId(wxID_OK);
+ else if (flags & wxYES)
+ SetAffirmativeId(wxID_YES);
return sizer;
}