From 33e9fc549ce7d880fc5dc421e8ebbbf2559ce894 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 20 May 2005 16:17:57 +0000 Subject: [PATCH] Set focus to the grid windwo when it is left-clicked git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34199 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/grid.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 78e502fc75..66b281a033 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -3758,6 +3758,9 @@ void wxGridWindow::ScrollWindow( int dx, int dy, const wxRect *rect ) void wxGridWindow::OnMouseEvent( wxMouseEvent& event ) { + if (event.ButtonDown(wxMOUSE_BTN_LEFT) && FindFocus() != this) + SetFocus(); + m_owner->ProcessGridCellMouseEvent( event ); } -- 2.50.0