Don't force ColWidth to always grow for wxGridCellAutoWrapStringRenderer (#1798)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Neis
2008-06-29 15:15:19 +00:00
parent 5a1a494861
commit c3f80e6c6b

View File

@@ -380,7 +380,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);