]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 851044 ] wxGrid receives wxFocusEvent
authorJulian Smart <julian@anthemion.co.uk>
Thu, 8 Jan 2004 15:15:45 +0000 (15:15 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 8 Jan 2004 15:15:45 +0000 (15:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/grid.cpp

index 140e6333cd0782541f53fc1ca1a23b2f9ef00d0b..df678794c9b960ca2e8b35c8c8b1c2a722df8f6e 100644 (file)
@@ -221,7 +221,7 @@ private:
     void OnKeyDown( wxKeyEvent& );
     void OnKeyUp( wxKeyEvent& );
     void OnEraseBackground( wxEraseEvent& );
-
+    void OnFocus( wxFocusEvent& );
 
     DECLARE_DYNAMIC_CLASS(wxGridWindow)
     DECLARE_EVENT_TABLE()
@@ -3662,6 +3662,8 @@ BEGIN_EVENT_TABLE( wxGridWindow, wxWindow )
     EVT_MOUSE_EVENTS( wxGridWindow::OnMouseEvent )
     EVT_KEY_DOWN( wxGridWindow::OnKeyDown )
     EVT_KEY_UP( wxGridWindow::OnKeyUp )
+    EVT_SET_FOCUS( wxGridWindow::OnFocus )
+    EVT_KILL_FOCUS( wxGridWindow::OnFocus )
     EVT_ERASE_BACKGROUND( wxGridWindow::OnEraseBackground )
 END_EVENT_TABLE()
 
@@ -3737,6 +3739,11 @@ void wxGridWindow::OnEraseBackground( wxEraseEvent& WXUNUSED(event) )
 {
 }
 
+void wxGridWindow::OnFocus(wxFocusEvent& event)
+{
+    if ( !m_owner->GetEventHandler()->ProcessEvent( event ) )
+        event.Skip();
+}
 
 //////////////////////////////////////////////////////////////////////