From 568a2ec9d5220b73d913dff836602f177e1815ad Mon Sep 17 00:00:00 2001 From: blikblum Date: Thu, 14 Jun 2007 12:44:16 +0000 Subject: [PATCH] * Fix Node position when expanding a node with a TotalHeight > ClientHeight ehrn header is visible * Publish BorderSpacing git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@180 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/virtualtreeview-unstable/VirtualTrees.pas | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/virtualtreeview-unstable/VirtualTrees.pas b/components/virtualtreeview-unstable/VirtualTrees.pas index 8c2094b10..c30ee5ff7 100644 --- a/components/virtualtreeview-unstable/VirtualTrees.pas +++ b/components/virtualtreeview-unstable/VirtualTrees.pas @@ -2909,6 +2909,7 @@ type //property BevelOuter; //property BevelKind; //property BevelWidth; + property BorderSpacing; property BorderStyle; property BottomSpace; property ButtonFillMode; @@ -3120,6 +3121,7 @@ type //property BevelOuter; //property BevelKind; // property BevelWidth; + property BorderSpacing; property BorderStyle; property BottomSpace; property ButtonFillMode; @@ -14586,6 +14588,8 @@ begin Run := Run.Parent; end; R := GetDisplayRect(Node, FHeader.MainColumn, True); + if hoVisible in FHeader.Options then + Dec(R.Top, FHeader.Height); SetOffsetY(FOffsetY - R.Top); end; end; @@ -29048,7 +29052,8 @@ begin // Scroll as much child nodes into view as possible if the node has been expanded. if (toAutoScrollOnExpand in FOptions.FAutoOptions) and (vsExpanded in Node.States) then begin - if Integer(Node.TotalHeight) <= ClientHeight then + //lcl adjust header + if Integer(Node.TotalHeight) <= (ClientHeight - FHeaderRect.Bottom) then ScrollIntoView(GetLastChild(Node), toCenterScrollIntoView in FOptions.SelectionOptions) else TopNode := Node;