reduced TProgressBar setproperties calls

git-svn-id: trunk@4319 -
This commit is contained in:
mattias 2003-06-25 21:02:20 +00:00
parent 03f2d1e5c8
commit 8499810524
2 changed files with 71 additions and 67 deletions

View File

@ -457,6 +457,7 @@ type
protected
procedure ApplyChanges;
procedure InitializeWnd; override;
procedure Loaded; override;
{ procedure SetBarTextFormat; }
public
constructor Create(AOwner: TComponent); override;
@ -1800,6 +1801,9 @@ end.
{ =============================================================================
$Log$
Revision 1.80 2003/06/25 21:02:19 mattias
reduced TProgressBar setproperties calls
Revision 1.79 2003/06/19 16:36:35 mattias
started codeexplorer

View File

@ -1,3 +1,4 @@
// included by comctrls.pp
{******************************************************************************
TProgressBar
******************************************************************************
@ -51,6 +52,7 @@ begin
FOrientation := pbHorizontal;
FBarShowText := false;
FBarTextFormat := '%v from [%l-%u] (=%p%%)';
SetInitialBounds(0,0,100,20);
end;
{------------------------------------------------------------------------------
@ -67,6 +69,12 @@ begin
ApplyChanges;
end;
procedure TProgressBar.Loaded;
begin
inherited Loaded;
ApplyChanges;
end;
{------------------------------------------------------------------------------
Method: TProgressBar.GetMin
Params: Nothing
@ -76,10 +84,9 @@ end;
------------------------------------------------------------------------------}
function TProgressBar.GetMin: Integer;
begin
result := FMin;
Result := FMin;
end;
{------------------------------------------------------------------------------
Method: TProgressBar.GetMax
Params: Nothing
@ -89,10 +96,9 @@ end;
------------------------------------------------------------------------------}
function TProgressBar.GetMax: Integer;
begin
result := FMax;
Result := FMax;
end;
{------------------------------------------------------------------------------
Method: TProgressBar.GetPosition
Params: Nothing
@ -102,10 +108,9 @@ end;
------------------------------------------------------------------------------}
function TProgressBar.GetPosition: Integer;
begin
result := FPosition;
Result := FPosition;
end;
{------------------------------------------------------------------------------
Method: TProgressBar.SetParams
Params: Min & Max for the progressbar
@ -153,7 +158,6 @@ begin
end;
end;
{------------------------------------------------------------------------------
Method: TProgressBar.SetPosition
Params: New acutal position for the progressbar
@ -237,7 +241,6 @@ begin
StepIt;
end;
{------------------------------------------------------------------------------
Method: TProgressBar.ApplyChanges
Params: Nothing
@ -247,8 +250,8 @@ end;
------------------------------------------------------------------------------}
procedure TProgressBar.ApplyChanges;
begin
if HandleAllocated
then CNSendMessage (LM_SETPROPERTIES, Self, nil);
if HandleAllocated and (not (csLoading in ComponentState)) then
CNSendMessage(LM_SETPROPERTIES, Self, nil);
end;
@ -289,16 +292,13 @@ begin
end;
end;
{
procedure TProgressBar.SetBarTextFormat (value : string);
begin
FBarTextFormat := Value;
ApplyChanges;
end;
}
// included by comctrls.pp
{
$Log$
Revision 1.4 2003/06/25 21:02:20 mattias
reduced TProgressBar setproperties calls
Revision 1.3 2002/05/10 06:05:55 lazarus
MG: changed license to LGPL