From 4fa0077e9cc0c15f209e72a1817c7b34d1704066 Mon Sep 17 00:00:00 2001 From: Luiz Rafael Culik Date: Sun, 31 Mar 2002 16:53:00 +0000 Subject: [PATCH] See changelog 2002-03-31 14:00 UTC -0300 --- harbour/source/rtl/tbrowse.prg | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/harbour/source/rtl/tbrowse.prg b/harbour/source/rtl/tbrowse.prg index 9ee5dd1d16..45c477d8e7 100644 --- a/harbour/source/rtl/tbrowse.prg +++ b/harbour/source/rtl/tbrowse.prg @@ -472,13 +472,13 @@ return nHowMany METHOD SetColumnWidth( oCol ) CLASS TBrowse LOCAL xRes, cType, nTokenPos := 0, nL, cHeading - LOCAL nWidthMax := ::nRight - ::nLeft + 1 // Visible width of TBrowse - LOCAL nWidth := 0 + LOCAL nWidthMax := ::nRight - ::nLeft+1 // Visible width of TBrowse + LOCAL nWidth := 0,nColWidth:=0 // if oCol has :Width property set I use it if oCol:Width <> nil .AND. oCol:Width < (nWidthMax - 4) nWidth := oCol:Width - + else if ISBLOCK( oCol:block ) @@ -504,9 +504,12 @@ METHOD SetColumnWidth( oCol ) CLASS TBrowse cHeading := oCol:Heading + ";" while (nL := Len(__StrTkPtr(@cHeading, @nTokenPos, ";"))) > 0 if nL > nWidth - nWidth := nL + nColWidth := nL endif enddo + if nColWidth> nWidth + nColWidth:=nWidth + endif if nWidth > nWidthMax // with values lower than -4 it SIGSEVs here and there :-(