MG: broke extctrls.pp <-> forms.pp circle

git-svn-id: trunk@3551 -
This commit is contained in:
lazarus 2002-10-24 10:27:52 +00:00
parent 27ddcbc159
commit a1b7c185ea
3 changed files with 14 additions and 10 deletions

View File

@ -38,7 +38,7 @@ interface
uses uses
Classes, Controls, VCLGlobals, SysUtils, GraphType, Graphics, Menus, Classes, Controls, VCLGlobals, SysUtils, GraphType, Graphics, Menus,
LCLLinux, LCLType, LMessages; LCLLinux, LCLType, LMessages, CustomTimer;
type type
TPosition = (poDesigned, poDefault, poDefaultPosOnly, poDefaultSizeOnly, TPosition = (poDesigned, poDefault, poDefaultPosOnly, poDefaultSizeOnly,
@ -514,7 +514,7 @@ implementation
uses uses
StdCtrls, Interfaces, LResources, Dialogs, ExtCtrls, Math; StdCtrls, Interfaces, LResources, Dialogs, {ExtCtrls, }Math;
const const
FocusMessages : Boolean = true; FocusMessages : Boolean = true;

View File

@ -25,7 +25,7 @@
constructor THintWindow.Create(AOwner: TComponent); constructor THintWindow.Create(AOwner: TComponent);
var var
TheTimer: TTimer; TheTimer: TCustomTimer;
begin begin
inherited Create(AOwner); inherited Create(AOwner);
fCompStyle := csHintWindow; fCompStyle := csHintWindow;
@ -35,7 +35,7 @@ begin
Caption := 'THintWindow'; Caption := 'THintWindow';
SetBounds(1,1,25,25); SetBounds(1,1,25,25);
FHideInterval := 3000; FHideInterval := 3000;
TheTimer := TTimer.Create(self); TheTimer := TCustomTimer.Create(self);
FAutoHideTimer := TheTimer; FAutoHideTimer := TheTimer;
TheTimer.Interval := HideInterval; TheTimer.Interval := HideInterval;
TheTimer.Enabled := False; TheTimer.Enabled := False;
@ -53,21 +53,21 @@ Procedure THintWindow.SetHideInterval(Value : Integer);
Begin Begin
FHideInterval := Value; FHideInterval := Value;
if FAutoHideTimer<>nil then if FAutoHideTimer<>nil then
TTimer(FAutoHideTimer).Interval := FHideInterval; TCustomTimer(FAutoHideTimer).Interval := FHideInterval;
end; 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 (FAutoHideTimer<>nil) then
TTimer(FAutoHideTimer).Enabled := False; TCustomTimer(FAutoHideTimer).Enabled := False;
end; end;
Procedure THintWindow.AutoHideHint(Sender : TObject); Procedure THintWindow.AutoHideHint(Sender : TObject);
Begin Begin
if FAutoHideTimer<>nil then if FAutoHideTimer<>nil then
TTimer(FAutoHideTimer).Enabled := False; TCustomTimer(FAutoHideTimer).Enabled := False;
if Visible then if Visible then
Visible := False;//Hide; Visible := False;//Hide;
End; End;
@ -112,8 +112,8 @@ begin
SetBounds(ARect.Left, ARect.Top, SetBounds(ARect.Left, ARect.Top,
ARect.Right - ARect.Left, ARect.Bottom - ARect.Top); ARect.Right - ARect.Left, ARect.Bottom - ARect.Top);
Visible := True; Visible := True;
TTimer(FAutoHideTimer).Enabled := False; TCustomTimer(FAutoHideTimer).Enabled := False;
TTimer(FAutoHideTimer).Enabled := FAutoHide; TCustomTimer(FAutoHideTimer).Enabled := FAutoHide;
finally finally
FActivating := False; FActivating := False;
end; end;

View File

@ -18,7 +18,7 @@
***************************************************************************** *****************************************************************************
} }
{ (*{
TTimer Delphi compatibility: TTimer Delphi compatibility:
nearly 100% compatible, only WndProc is missing nearly 100% compatible, only WndProc is missing
@ -181,11 +181,15 @@ begin
UpdateTimer; UpdateTimer;
end; end;
end; end;
*)
// included by extctrls.pp // included by extctrls.pp
{ {
$Log$ $Log$
Revision 1.8 2002/10/24 10:27:52 lazarus
MG: broke extctrls.pp <-> forms.pp circle
Revision 1.7 2002/10/15 16:01:36 lazarus Revision 1.7 2002/10/15 16:01:36 lazarus
MG: fixed timers MG: fixed timers