* 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
This commit is contained in:
blikblum
2007-06-14 12:44:16 +00:00
parent 9077a895ca
commit 568a2ec9d5

View File

@ -2909,6 +2909,7 @@ type
//property BevelOuter; //property BevelOuter;
//property BevelKind; //property BevelKind;
//property BevelWidth; //property BevelWidth;
property BorderSpacing;
property BorderStyle; property BorderStyle;
property BottomSpace; property BottomSpace;
property ButtonFillMode; property ButtonFillMode;
@ -3120,6 +3121,7 @@ type
//property BevelOuter; //property BevelOuter;
//property BevelKind; //property BevelKind;
// property BevelWidth; // property BevelWidth;
property BorderSpacing;
property BorderStyle; property BorderStyle;
property BottomSpace; property BottomSpace;
property ButtonFillMode; property ButtonFillMode;
@ -14586,6 +14588,8 @@ begin
Run := Run.Parent; Run := Run.Parent;
end; end;
R := GetDisplayRect(Node, FHeader.MainColumn, True); R := GetDisplayRect(Node, FHeader.MainColumn, True);
if hoVisible in FHeader.Options then
Dec(R.Top, FHeader.Height);
SetOffsetY(FOffsetY - R.Top); SetOffsetY(FOffsetY - R.Top);
end; end;
end; end;
@ -29048,7 +29052,8 @@ begin
// Scroll as much child nodes into view as possible if the node has been expanded. // 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 if (toAutoScrollOnExpand in FOptions.FAutoOptions) and (vsExpanded in Node.States) then
begin 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) ScrollIntoView(GetLastChild(Node), toCenterScrollIntoView in FOptions.SelectionOptions)
else else
TopNode := Node; TopNode := Node;