fixed strange focus order in wxTipDialog and set initial focus to the checkbox instead of read-only textctrl

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2008-02-22 18:44:38 +00:00
parent b41f2bbc49
commit 66470d87a3

View File

@@ -225,20 +225,6 @@ wxTipDialog::wxTipDialog(wxWindow *parent,
// 1) create all controls in tab order // 1) create all controls in tab order
// smart phones does not support or do not waste space for wxButtons
#ifndef __SMARTPHONE__
wxButton *btnClose = new wxButton(this, wxID_CLOSE);
SetAffirmativeId(wxID_CLOSE);
#endif
m_checkbox = new wxCheckBox(this, wxID_ANY, _("&Show tips at startup"));
m_checkbox->SetValue(showAtStartup);
// smart phones does not support or do not waste space for wxButtons
#ifndef __SMARTPHONE__
wxButton *btnNext = new wxButton(this, wxID_NEXT_TIP, _("&Next Tip"));
#endif
wxStaticText *text = new wxStaticText(this, wxID_ANY, _("Did you know...")); wxStaticText *text = new wxStaticText(this, wxID_ANY, _("Did you know..."));
if (!isPda) if (!isPda)
@@ -279,6 +265,22 @@ wxTipDialog::wxTipDialog(wxWindow *parent,
//#endif //#endif
m_checkbox = new wxCheckBox(this, wxID_ANY, _("&Show tips at startup"));
m_checkbox->SetValue(showAtStartup);
m_checkbox->SetFocus();
// smart phones does not support or do not waste space for wxButtons
#ifndef __SMARTPHONE__
wxButton *btnNext = new wxButton(this, wxID_NEXT_TIP, _("&Next Tip"));
#endif
// smart phones does not support or do not waste space for wxButtons
#ifndef __SMARTPHONE__
wxButton *btnClose = new wxButton(this, wxID_CLOSE);
SetAffirmativeId(wxID_CLOSE);
#endif
// 2) put them in boxes // 2) put them in boxes
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );