void DirectoryParamsPanel::OnBtnDirSelectClick(wxCommandEvent &event) { wxDirDialog DlgDir(this, _T("Select directory"), wxGetCwd()); if ( DlgDir.ShowModal() == wxID_OK ) { m_pTxtSearchDirPath->SetValue(DlgDir.GetPath()); } event.Skip(); }
void DirectoryParamsPanel::OnBtnDirSelectClick(wxCommandEvent &event) { wxString dir = m_pSearchDirPath->GetValue(); if (dir.empty()) dir = wxGetCwd(); wxDirDialog DlgDir(this, _("Select directory"), dir); if ( DlgDir.ShowModal() == wxID_OK ) { m_pSearchDirPath->SetValue(DlgDir.GetPath()); m_pFindData->SetSearchPath(DlgDir.GetPath()); } event.Skip(); }