wxSizer *wxDialogBase::CreateButtonSizer(long flags)
{
- wxSizer *sizer = NULL;
-
#ifdef __SMARTPHONE__
wxDialog* dialog = (wxDialog*) this;
if ( flags & wxOK )
if ( flags & wxNO )
dialog->SetRightMenu(wxID_NO);
+
+ return NULL;
#else // !__SMARTPHONE__
#if wxUSE_BUTTON
wxSystemOptions::GetOptionInt(wxT("wince.dialog.real-ok-cancel")) )
#endif // __POCKETPC__
{
- sizer = CreateStdDialogButtonSizer(flags);
+ return CreateStdDialogButtonSizer(flags);
}
+#ifdef __POCKETPC__
+ return NULL;
+#endif // __POCKETPC__
+
#else // !wxUSE_BUTTON
wxUnusedVar(flags);
+
+ return NULL;
#endif // wxUSE_BUTTON/!wxUSE_BUTTON
#endif // __SMARTPHONE__/!__SMARTPHONE__
-
- return sizer;
}
wxSizer *wxDialogBase::CreateSeparatedButtonSizer(long flags)
bool wxDialogBase::DoLayoutAdaptation()
{
if (GetLayoutAdapter())
- return GetLayoutAdapter()->DoLayoutAdaptation((wxDialog*) this);
+ {
+ wxWindow* focusWindow = wxFindFocusDescendant(this); // from event.h
+ if (GetLayoutAdapter()->DoLayoutAdaptation((wxDialog*) this))
+ {
+ if (focusWindow)
+ focusWindow->SetFocus();
+ return true;
+ }
+ else
+ return false;
+ }
else
return false;
}