mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-06 08:38:25 +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
|
with GetControlClassDefaultSize do
|
||||||
SetInitialBounds(0, 0, CX, CY);
|
SetInitialBounds(0, 0, CX, CY);
|
||||||
FHideInterval := 3000;
|
FHideInterval := 3000;
|
||||||
|
FAutoHide := False;
|
||||||
FAutoHideTimer := TCustomTimer.Create(self);
|
FAutoHideTimer := TCustomTimer.Create(self);
|
||||||
FAutoHideTimer.Interval := HideInterval;
|
FAutoHideTimer.Interval := HideInterval;
|
||||||
FAutoHideTimer.Enabled := False;
|
FAutoHideTimer.Enabled := False;
|
||||||
@ -56,7 +57,7 @@ end;
|
|||||||
procedure THintWindow.SetHideInterval(Value : Integer);
|
procedure THintWindow.SetHideInterval(Value : Integer);
|
||||||
Begin
|
Begin
|
||||||
FHideInterval := Value;
|
FHideInterval := Value;
|
||||||
if FAutoHideTimer<>nil then
|
if Assigned(FAutoHideTimer) then
|
||||||
FAutoHideTimer.Interval := FHideInterval;
|
FAutoHideTimer.Interval := FHideInterval;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -126,13 +127,13 @@ end;
|
|||||||
procedure THintWindow.SetAutoHide(Value : Boolean);
|
procedure THintWindow.SetAutoHide(Value : Boolean);
|
||||||
Begin
|
Begin
|
||||||
FAutoHide := Value;
|
FAutoHide := Value;
|
||||||
if not (value) and (FAutoHideTimer<>nil) then
|
if not Value and Assigned(FAutoHideTimer) then
|
||||||
FAutoHideTimer.Enabled := False;
|
FAutoHideTimer.Enabled := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure THintWindow.AutoHideHint(Sender : TObject);
|
procedure THintWindow.AutoHideHint(Sender : TObject);
|
||||||
begin
|
begin
|
||||||
if FAutoHideTimer <> nil then
|
if Assigned(FAutoHideTimer) then
|
||||||
FAutoHideTimer.Enabled := False;
|
FAutoHideTimer.Enabled := False;
|
||||||
if Visible then
|
if Visible then
|
||||||
Visible := False;
|
Visible := False;
|
||||||
|
Loading…
Reference in New Issue
Block a user