]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/gridctrl.cpp
fix drawing of the column move hint when the grid is scrolled to the right (#9776)
[wxWidgets.git] / src / generic / gridctrl.cpp
index 0d69504f6575d1917357d74718773fba23f7f300..e5ec58360f8a9c47c0015720c4da75fbd132cbb7 100644 (file)
@@ -378,7 +378,10 @@ wxGridCellAutoWrapStringRenderer::GetBestSize(wxGrid& grid,
                                               wxDC& dc,
                                               int row, int col)
 {
-    wxCoord x,y, height , width = grid.GetColSize(col) -10;
+    wxCoord x,y, height , width = grid.GetColSize(col) -20;
+    // for width, subtract 20 because ColSize includes a magin of 10 pixels
+    // that we do not want here and because we always start with an increment
+    // by 10 in the loop below.
     int count = 250; //Limit iterations..
 
     wxRect rect(0,0,width,10);