]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/helpfrm.cpp
reenabled WS_EX_CONTROLPARENT style together with a check that the focus window is...
[wxWidgets.git] / src / html / helpfrm.cpp
index 8333e379bece25afb96666c6ffa227192160c1c3..07096d4c71357173b7b4478f2b4e93850de98469 100644 (file)
@@ -10,7 +10,7 @@
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
-#pragma implementation
+#pragma implementation "helpfrm.h"
 #endif
 
 // For compilers that support precompilation, includes "wx.h"
@@ -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)