From: Robin Dunn Date: Fri, 1 Dec 2006 23:51:49 +0000 (+0000) Subject: Ensure that the listctrl takes the focus on left-click X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8d4b048e27e72be25ec727fadc560c15e19fbcb3 Ensure that the listctrl takes the focus on left-click git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 0b7905dcf3..d96d2cbff2 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -2964,6 +2964,9 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) m_textctrlWrapper->AcceptChangesAndFinish(); #endif // __WXMAC__ + if ( event.LeftDown() ) + SetFocus(); + event.SetEventObject( GetParent() ); if ( GetParent()->GetEventHandler()->ProcessEvent( event) ) return;