]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
add wxART_NEW, and fixed wxART_FIND_AND_REPLACE
[wxWidgets.git] / src / generic / grid.cpp
index 78e502fc7557a2dcf865761cacd41680d35ede0e..a658bb4db2b4235e393c5f3adca92aa947aa4b98 100644 (file)
@@ -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 );
 }
 
@@ -7255,7 +7258,7 @@ void wxGrid::DrawRowLabels( wxDC& dc ,const wxArrayInt& rows)
 
 void wxGrid::DrawRowLabel( wxDC& dc, int row )
 {
-    if ( GetRowHeight(row) <= 0 )
+    if ( GetRowHeight(row) <= 0 || m_rowLabelWidth <= 0 )
         return;
 
     wxRect rect;
@@ -7317,7 +7320,7 @@ void wxGrid::DrawColLabels( wxDC& dc,const wxArrayInt& cols )
 
 void wxGrid::DrawColLabel( wxDC& dc, int col )
 {
-    if ( GetColWidth(col) <= 0 )
+    if ( GetColWidth(col) <= 0 || m_colLabelHeight <= 0 )
         return;
 
     int colLeft = GetColLeft(col);