X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6a147dfefdf8abe201ee4cb854581d777c29d58e..9acbe413f9d63c0925d5bfc232e96581474f5234:/src/generic/gridctrl.cpp diff --git a/src/generic/gridctrl.cpp b/src/generic/gridctrl.cpp index 0d69504f65..e5ec58360f 100644 --- a/src/generic/gridctrl.cpp +++ b/src/generic/gridctrl.cpp @@ -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);