You've already forked lazarus-ccr
ExCtrls: Fix TProgressBarEx repainting itself again and again.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8780 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -76,6 +76,8 @@ type
|
||||
property ParentShowHint;
|
||||
property ShowHint;
|
||||
property Visible;
|
||||
|
||||
property OnPaint;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@@ -86,6 +88,8 @@ uses
|
||||
constructor TProgressbarEx.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
ControlStyle := ControlStyle - [csSetCaption];
|
||||
|
||||
FCaption := '';
|
||||
FColors[0] := DEFAULT_BACKCOLOR;
|
||||
FColors[1] := DEFAULT_BORDERCOLOR;
|
||||
@@ -95,9 +99,12 @@ begin
|
||||
FMarqueeSpeed := DEFAULT_MARQUEESPEED;
|
||||
FMax := 100;
|
||||
FStyle := pbstNormal;
|
||||
|
||||
FTimer := TTimer.Create(self);
|
||||
FTimer.Interval := 25;
|
||||
FTimer.OnTimer := @TimerHandler;
|
||||
FTimer.Enabled := false;
|
||||
|
||||
with GetControlClassDefaultSize do
|
||||
SetInitialBounds(0, 0, CX, CY);
|
||||
end;
|
||||
@@ -303,6 +310,8 @@ begin
|
||||
else
|
||||
Canvas.TextOut((Width - txtSize.CY) div 2, R.Bottom - (Height - txtSize.CX) div 2, FCaption);
|
||||
end;
|
||||
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TProgressbarEx.SetCaption(AValue: String);
|
||||
|
||||
Reference in New Issue
Block a user