diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 60ab00568e..90ddc8624c 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -1238,6 +1238,7 @@ wxSize wxGridCellStringRenderer::DoGetBestSize(wxGridCellAttr& attr, wxCoord x, y; dc.SetFont(attr.GetFont()); dc.GetTextExtent(text, &x, &y); + y *= 1 + text.Freq('\n'); // multiply by the number of lines. return wxSize(x, y); } @@ -7630,6 +7631,10 @@ void wxGrid::AutoSizeColOrRow( int colOrRow, bool setAsMin, bool column ) // leave some space around text extentMax += 10; } + else + { + extentMax += 6; + } } if ( column )