From de99993b53a4157a43baaf3426cb8d0765aca552 Mon Sep 17 00:00:00 2001 From: blikblum Date: Mon, 7 May 2012 01:50:23 +0000 Subject: [PATCH] * Fix autoscroll with headers. Issue 21944 git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2418 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../virtualtreeview-new/branches/4.8/VirtualTrees.pas | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/components/virtualtreeview-new/branches/4.8/VirtualTrees.pas b/components/virtualtreeview-new/branches/4.8/VirtualTrees.pas index 500eaa22c..7a345d1e5 100644 --- a/components/virtualtreeview-new/branches/4.8/VirtualTrees.pas +++ b/components/virtualtreeview-new/branches/4.8/VirtualTrees.pas @@ -17876,11 +17876,14 @@ begin Include(Result, sdLeft); if (ClientWidth + FEffectiveOffsetX < Integer(FRangeX)) and (X > ClientWidth - Integer(FDefaultNodeHeight)) then Include(Result, sdRight); + //lclheader + if (ClientHeight - FOffsetY < Integer(FRangeY)) and (Y > inherited GetClientRect.Bottom - Integer(FDefaultNodeHeight)) then + Include(Result, sdDown); + if hoVisible in FHeader.FOptions then + Dec(Y, FHeader.Height); if (Y < Integer(FDefaultNodeHeight)) and (FOffsetY <> 0) then Include(Result, sdUp); - if (ClientHeight - FOffsetY < Integer(FRangeY)) and (Y > ClientHeight - Integer(FDefaultNodeHeight)) then - Include(Result, sdDown); //todo: probably the code below is bug due to poor timeGetTime implementation // Since scrolling during dragging is not handled via the timer we do a check here whether the auto @@ -19383,7 +19386,8 @@ var begin GetCursorPos(P); - R := ClientRect; + //lclheader + R := inherited GetClientRect; ClipRect := R; //todo: add MapWindowPoints to LCL?? {$ifndef INCOMPLETE_WINAPI}