From 66470d87a36ef2a3a9c97ff78c7c4dee587cfd73 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 22 Feb 2008 18:44:38 +0000 Subject: [PATCH] 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 --- src/generic/tipdlg.cpp | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/generic/tipdlg.cpp b/src/generic/tipdlg.cpp index 491a0ba700..85a63ad860 100644 --- a/src/generic/tipdlg.cpp +++ b/src/generic/tipdlg.cpp @@ -225,20 +225,6 @@ wxTipDialog::wxTipDialog(wxWindow *parent, // 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...")); if (!isPda) @@ -279,6 +265,22 @@ wxTipDialog::wxTipDialog(wxWindow *parent, //#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 wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL ); -- 2.45.2