mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 20:09:10 +02:00
lcl: allow to work with TTreeView.TopItem when handle is not allocated
git-svn-id: trunk@16691 -
This commit is contained in:
parent
7f06e41a7c
commit
1b88decc3d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user