On Sun, 2006-02-05 at 11:15 +0100, Matthijs Willemstein wrote: > Morning, > > The attached patch fixes a "feature" in TCustomProgressBar. > StepBy(Value) would increase the position by (FStep - Value), if Value > is smaller the FStep. > ie. FStep = 10, position = 20 > StepBy(3) would make position 27 in stead of 23. This patch is even simpeler. Please apply this one and ignore previous one.
Matthijs -- Matthijs Willemstein <[EMAIL PROTECTED]>
Index: progressbar.inc =================================================================== --- progressbar.inc (revision 8681) +++ progressbar.inc (working copy) @@ -236,8 +236,7 @@ ------------------------------------------------------------------------------} procedure TCustomProgressBar.StepBy(Delta: Integer); begin - if FStep < Delta then FPosition := FPosition + (Delta - FStep); - if FStep > Delta then FPosition := FPosition - (Delta); + FPosition := FPosition + Delta - FStep; StepIt; end;
