mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 15:10:16 +02:00
reduced TProgressBar setproperties calls
git-svn-id: trunk@4319 -
This commit is contained in:
parent
03f2d1e5c8
commit
8499810524
@ -457,6 +457,7 @@ type
|
|||||||
protected
|
protected
|
||||||
procedure ApplyChanges;
|
procedure ApplyChanges;
|
||||||
procedure InitializeWnd; override;
|
procedure InitializeWnd; override;
|
||||||
|
procedure Loaded; override;
|
||||||
{ procedure SetBarTextFormat; }
|
{ procedure SetBarTextFormat; }
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
@ -1800,6 +1801,9 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$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
|
Revision 1.79 2003/06/19 16:36:35 mattias
|
||||||
started codeexplorer
|
started codeexplorer
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// included by comctrls.pp
|
||||||
{******************************************************************************
|
{******************************************************************************
|
||||||
TProgressBar
|
TProgressBar
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
@ -51,6 +52,7 @@ begin
|
|||||||
FOrientation := pbHorizontal;
|
FOrientation := pbHorizontal;
|
||||||
FBarShowText := false;
|
FBarShowText := false;
|
||||||
FBarTextFormat := '%v from [%l-%u] (=%p%%)';
|
FBarTextFormat := '%v from [%l-%u] (=%p%%)';
|
||||||
|
SetInitialBounds(0,0,100,20);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -67,6 +69,12 @@ begin
|
|||||||
ApplyChanges;
|
ApplyChanges;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TProgressBar.Loaded;
|
||||||
|
begin
|
||||||
|
inherited Loaded;
|
||||||
|
ApplyChanges;
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TProgressBar.GetMin
|
Method: TProgressBar.GetMin
|
||||||
Params: Nothing
|
Params: Nothing
|
||||||
@ -76,10 +84,9 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
function TProgressBar.GetMin: Integer;
|
function TProgressBar.GetMin: Integer;
|
||||||
begin
|
begin
|
||||||
result := FMin;
|
Result := FMin;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TProgressBar.GetMax
|
Method: TProgressBar.GetMax
|
||||||
Params: Nothing
|
Params: Nothing
|
||||||
@ -89,10 +96,9 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
function TProgressBar.GetMax: Integer;
|
function TProgressBar.GetMax: Integer;
|
||||||
begin
|
begin
|
||||||
result := FMax;
|
Result := FMax;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TProgressBar.GetPosition
|
Method: TProgressBar.GetPosition
|
||||||
Params: Nothing
|
Params: Nothing
|
||||||
@ -102,10 +108,9 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
function TProgressBar.GetPosition: Integer;
|
function TProgressBar.GetPosition: Integer;
|
||||||
begin
|
begin
|
||||||
result := FPosition;
|
Result := FPosition;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TProgressBar.SetParams
|
Method: TProgressBar.SetParams
|
||||||
Params: Min & Max for the progressbar
|
Params: Min & Max for the progressbar
|
||||||
@ -153,7 +158,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TProgressBar.SetPosition
|
Method: TProgressBar.SetPosition
|
||||||
Params: New acutal position for the progressbar
|
Params: New acutal position for the progressbar
|
||||||
@ -237,7 +241,6 @@ begin
|
|||||||
StepIt;
|
StepIt;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TProgressBar.ApplyChanges
|
Method: TProgressBar.ApplyChanges
|
||||||
Params: Nothing
|
Params: Nothing
|
||||||
@ -247,8 +250,8 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TProgressBar.ApplyChanges;
|
procedure TProgressBar.ApplyChanges;
|
||||||
begin
|
begin
|
||||||
if HandleAllocated
|
if HandleAllocated and (not (csLoading in ComponentState)) then
|
||||||
then CNSendMessage (LM_SETPROPERTIES, Self, nil);
|
CNSendMessage(LM_SETPROPERTIES, Self, nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -289,16 +292,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{
|
// included by comctrls.pp
|
||||||
procedure TProgressBar.SetBarTextFormat (value : string);
|
|
||||||
begin
|
|
||||||
FBarTextFormat := Value;
|
|
||||||
ApplyChanges;
|
|
||||||
end;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
Revision 1.3 2002/05/10 06:05:55 lazarus
|
||||||
MG: changed license to LGPL
|
MG: changed license to LGPL
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user