void MyFrame::OnFind(wxCommandEvent& evt) { wxTextEntryDialog dlg(this, wxT("Please enter the text you wish to find:"), wxT("Find Text"), wxT("")); int res = dlg.ShowModal(); if (res != wxID_OK) return; // set the find text m_find_text = dlg.GetValue(); // set the flags to use when finding the text m_find_flags = 0; m_find_flags |= wxWEB_FIND_WRAP; m_find_flags |= wxWEB_FIND_SEARCH_FRAMES; // some additional flags: // wxWEB_FIND_BACKWARDS // wxWEB_FIND_MATCH_CASE // wxWEB_FIND_ENTIRE_WORD m_browser->Find(m_find_text, m_find_flags); }
void MyFrame::OnFindAgain(wxCommandEvent& evt) { m_browser->Find(m_find_text, m_find_flags); }