mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-31 07:32:41 +02:00
lcl: cleanup hintwindow
git-svn-id: trunk@35171 -
This commit is contained in:
parent
c8fa2b4962
commit
b56160fe13
@ -41,6 +41,7 @@ begin
|
||||
with GetControlClassDefaultSize do
|
||||
SetInitialBounds(0, 0, CX, CY);
|
||||
FHideInterval := 3000;
|
||||
FAutoHide := False;
|
||||
FAutoHideTimer := TCustomTimer.Create(self);
|
||||
FAutoHideTimer.Interval := HideInterval;
|
||||
FAutoHideTimer.Enabled := False;
|
||||
@ -56,7 +57,7 @@ end;
|
||||
procedure THintWindow.SetHideInterval(Value : Integer);
|
||||
Begin
|
||||
FHideInterval := Value;
|
||||
if FAutoHideTimer<>nil then
|
||||
if Assigned(FAutoHideTimer) then
|
||||
FAutoHideTimer.Interval := FHideInterval;
|
||||
end;
|
||||
|
||||
@ -126,13 +127,13 @@ end;
|
||||
procedure THintWindow.SetAutoHide(Value : Boolean);
|
||||
Begin
|
||||
FAutoHide := Value;
|
||||
if not (value) and (FAutoHideTimer<>nil) then
|
||||
if not Value and Assigned(FAutoHideTimer) then
|
||||
FAutoHideTimer.Enabled := False;
|
||||
end;
|
||||
|
||||
procedure THintWindow.AutoHideHint(Sender : TObject);
|
||||
begin
|
||||
if FAutoHideTimer <> nil then
|
||||
if Assigned(FAutoHideTimer) then
|
||||
FAutoHideTimer.Enabled := False;
|
||||
if Visible then
|
||||
Visible := False;
|
||||
|
Loading…
Reference in New Issue
Block a user