lcl: allow to work with TTreeView.TopItem when handle is not allocated

git-svn-id: trunk@16691 -
This commit is contained in:
paul 2008-09-24 06:15:15 +00:00
parent 7f06e41a7c
commit 1b88decc3d

View File

@ -3627,15 +3627,18 @@ begin
UpdateTopItem;
Result := FTopItem;
end else
Result := nil;
Result := FTopItem;
end;
procedure TCustomTreeView.SetTopItem(Value: TTreeNode);
begin
if HandleAllocated and (Value <> nil) then begin
if HandleAllocated and (Value <> nil) then
begin
Value.MakeVisible;
ScrolledTop:=Value.Top;
end;
end
else
FTopItem := Value;
end;
procedure TCustomTreeView.OnChangeTimer(Sender: TObject);