diff --git a/harbour/source/debug/dbgtobj.prg b/harbour/source/debug/dbgtobj.prg index 0267350838..0083a7e705 100644 --- a/harbour/source/debug/dbgtobj.prg +++ b/harbour/source/debug/dbgtobj.prg @@ -88,14 +88,16 @@ local oBrwSets,nSize:=Len(AArray) Local owndsets local nWidth local oCol + local nMaxElem + if (nsize nil - owndsets:=TDbWindow():New( nRow, 11, if(nRow+nsize+1 0, Min( ::arrayindex+nSkip, Len(::arrayreference)),; Max( 1, ::arrayindex + nSkip ) ), ::arrayindex - nPos } oBrwSets:AddColumn( ocol:= TBColumnNew("", { || ::ArrayReference[::arrayindex,1]} )) -// ocol:width:=maxelem(::AllNames) + nMaxElem = maxelem(::AllNames) + ocol:width := nMaxElem ocol:ColorBlock := { || { iif( ::Arrayindex == oBrwSets:Cargo, 2, 1 ), 2 } } oBrwSets:Freeze:=1 oBrwSets:AddColumn( ocol:=TBColumnNew( "" ,{ || PadR( ValToStr( ::ArrayReference[ ::arrayindex ,2] ), nWidth - 12 ) } ) ) oBrwSets:Cargo := 1 // Actual highligthed row ocol:ColorBlock := { || { iif( ::Arrayindex == oBrwSets:Cargo, 3, 1 ), 3 } } -// ocol:width:=15 + ocol:width:= MaxCol() - 14 - nMaxElem oBrwsets:colpos:=2 ::aWindows[::nCurWindow]:bPainted := { || oBrwSets:ForceStable() } ::aWindows[::nCurWindow]:bKeyPressed := { | nKey | ::SetsKeyPressed( nKey, oBrwSets, Len( aArray ),; @@ -169,6 +172,14 @@ method SetsKeyPressed( nKey, oBrwSets, nSets, oWnd ,cName,LenArr,aArray) class t oBrwSets:ForceStable() endif + case nKey == K_PGUP + oBrwSets:PageUp() + oBrwSets:ForceStable() + + case nKey == K_PGDN + oBrwSets:PageDown() + oBrwSets:ForceStable() + Case nKey ==13 if nSet==oBrwSets:Cargo if valtype(aArray[nSet,2])=="A" @@ -278,11 +289,8 @@ static FUNC maxelem( a ) LOCAL nSize := LEN( a ) LOCAL max := 0 LOCAL tam := 0 - LOCAL nMax2 := 0 - LOCAL nPos := 1 - LOCAL cString - LOCAL nCount + FOR nCount := 1 TO nSize tam := LEN( a[ nCount ] ) max := IF( tam > max, tam, max )