Keyboard focus fixed

This commit is contained in:
Simon Rozman 2016-06-09 15:39:00 +02:00
parent 6800de3df7
commit eadcc5eadd
3 changed files with 14 additions and 4 deletions

View File

@ -231,6 +231,11 @@ public:
/// Constructs a banner pannel and set the title text to product name
///
wxEAPBannerPanel(wxWindow* parent);
protected:
/// \cond internal
virtual bool AcceptsFocusFromKeyboard() const { return false; }
/// \endcond
};

View File

@ -36,11 +36,14 @@ wxEAPCredentialsDialog::wxEAPCredentialsDialog(wxWindow* parent) : wxEAPCredenti
void wxEAPCredentialsDialog::AddContents(wxPanel **contents, size_t content_count)
{
for (size_t i = 0; i < content_count; i++)
m_panels->Add(contents[i], 0, wxALL|wxEXPAND, 5);
if (content_count) {
for (size_t i = 0; i < content_count; i++)
m_panels->Add(contents[i], 0, wxALL|wxEXPAND, 5);
this->Layout();
this->GetSizer()->Fit(this);
this->Layout();
this->GetSizer()->Fit(this);
contents[0]->SetFocusFromKbd();
}
}

View File

@ -204,6 +204,8 @@ wxEAPTTLSConfig::wxEAPTTLSConfig(eap::config_ttls &cfg, LPCTSTR pszCredTarget, w
this->SetSizer(sb_content);
this->Layout();
m_outer_identity->SetFocusFromKbd();
// Connect Events
this->Connect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(wxEAPTTLSConfig::OnInitDialog));
}