Set the focus to the html display window

if the help frame comes to the front.
    With this, you can use context sensitive
    help systems without the mouse.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2002-05-25 09:40:17 +00:00
parent 51b07644bb
commit d45bc43695
2 changed files with 10 additions and 0 deletions

View File

@@ -164,6 +164,7 @@ protected:
void OnSearch(wxCommandEvent& event); void OnSearch(wxCommandEvent& event);
void OnBookmarksSel(wxCommandEvent& event); void OnBookmarksSel(wxCommandEvent& event);
void OnCloseWindow(wxCloseEvent& event); void OnCloseWindow(wxCloseEvent& event);
void OnActivate(wxActivateEvent& event);
// Images: // Images:
enum { enum {

View File

@@ -1099,6 +1099,14 @@ EVENT HANDLING :
*/ */
void wxHtmlHelpFrame::OnActivate(wxActivateEvent& event)
{
// This saves one mouse click when using the
// wxHTML for context sensitive help systems
if (event.GetActive() && m_HtmlWin)
m_HtmlWin->SetFocus();
}
void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event) void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event)
{ {
switch (event.GetId()) switch (event.GetId())
@@ -1448,6 +1456,7 @@ void wxHtmlHelpFrame::OnCloseWindow(wxCloseEvent& evt)
} }
BEGIN_EVENT_TABLE(wxHtmlHelpFrame, wxFrame) BEGIN_EVENT_TABLE(wxHtmlHelpFrame, wxFrame)
EVT_ACTIVATE(wxHtmlHelpFrame::OnActivate)
EVT_TOOL_RANGE(wxID_HTML_PANEL, wxID_HTML_OPTIONS, wxHtmlHelpFrame::OnToolbar) EVT_TOOL_RANGE(wxID_HTML_PANEL, wxID_HTML_OPTIONS, wxHtmlHelpFrame::OnToolbar)
EVT_BUTTON(wxID_HTML_BOOKMARKSREMOVE, wxHtmlHelpFrame::OnToolbar) EVT_BUTTON(wxID_HTML_BOOKMARKSREMOVE, wxHtmlHelpFrame::OnToolbar)
EVT_BUTTON(wxID_HTML_BOOKMARKSADD, wxHtmlHelpFrame::OnToolbar) EVT_BUTTON(wxID_HTML_BOOKMARKSADD, wxHtmlHelpFrame::OnToolbar)