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:
@@ -164,6 +164,7 @@ protected:
|
||||
void OnSearch(wxCommandEvent& event);
|
||||
void OnBookmarksSel(wxCommandEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
|
||||
// Images:
|
||||
enum {
|
||||
|
@@ -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)
|
||||
{
|
||||
switch (event.GetId())
|
||||
@@ -1448,6 +1456,7 @@ void wxHtmlHelpFrame::OnCloseWindow(wxCloseEvent& evt)
|
||||
}
|
||||
|
||||
BEGIN_EVENT_TABLE(wxHtmlHelpFrame, wxFrame)
|
||||
EVT_ACTIVATE(wxHtmlHelpFrame::OnActivate)
|
||||
EVT_TOOL_RANGE(wxID_HTML_PANEL, wxID_HTML_OPTIONS, wxHtmlHelpFrame::OnToolbar)
|
||||
EVT_BUTTON(wxID_HTML_BOOKMARKSREMOVE, wxHtmlHelpFrame::OnToolbar)
|
||||
EVT_BUTTON(wxID_HTML_BOOKMARKSADD, wxHtmlHelpFrame::OnToolbar)
|
||||
|
Reference in New Issue
Block a user