]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
add a outside area for borders and focus rects of 3 pixels to a wxWindowDC's clip...
[wxWidgets.git] / src / generic / grid.cpp
index c68571a1a2d3362a16fd7730884a832b2727b051..f38e12eb13300ff1a7d159f4e0f48237b95f7fe0 100644 (file)
@@ -3990,15 +3990,15 @@ void wxGrid::Create()
     wxColour lfg = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT );
     wxColour lbg = wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE );
 #endif
-    m_cornerLabelWin->SetDefaultForegroundColour(lfg);
-    m_cornerLabelWin->SetDefaultBackgroundColour(lbg);
-    m_rowLabelWin->SetDefaultForegroundColour(lfg);
-    m_rowLabelWin->SetDefaultBackgroundColour(lbg);
-    m_colLabelWin->SetDefaultForegroundColour(lfg);
-    m_colLabelWin->SetDefaultBackgroundColour(lbg);
+    m_cornerLabelWin->SetOwnForegroundColour(lfg);
+    m_cornerLabelWin->SetOwnBackgroundColour(lbg);
+    m_rowLabelWin->SetOwnForegroundColour(lfg);
+    m_rowLabelWin->SetOwnBackgroundColour(lbg);
+    m_colLabelWin->SetOwnForegroundColour(lfg);
+    m_colLabelWin->SetOwnBackgroundColour(lbg);
 
-    m_gridWin->SetDefaultForegroundColour(gfg);
-    m_gridWin->SetDefaultBackgroundColour(gbg);
+    m_gridWin->SetOwnForegroundColour(gfg);
+    m_gridWin->SetOwnBackgroundColour(gbg);
 
     Init();
 }
@@ -5543,11 +5543,17 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event )
 
         if ( XToEdgeOfCol(x) < 0  &&  YToEdgeOfRow(y) < 0 )
         {
-            SendEvent( wxEVT_GRID_CELL_LEFT_DCLICK,
-                       coords.GetRow(),
-                       coords.GetCol(),
-                       event );
+            if ( !SendEvent( wxEVT_GRID_CELL_LEFT_DCLICK,
+                             coords.GetRow(),
+                             coords.GetCol(),
+                             event ) )
+            {
+                // we want double click to select a cell and start editing
+                // (i.e. to behave in same way as sequence of two slow clicks):
+                m_waitForSlowClick = true;
+            }
         }
+
     }