View Issue Details

IDProjectCategoryView StatusLast Update
0003004JEDI VCL00 JVCL Componentspublic2005-06-01 06:07
ReportermholmesAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 
Target VersionFixed in Version3.10 
Summary0003004: ProgressPosition is not updated by ProgressStepIt in JVProgressComponent
DescriptionI'm working with JVProgressComponent, and I have some code to update it like this:

procedure TfrmMain.Timer1Timer(Sender: TObject);
begin
  with dlgJVProgComp do
    begin
      if Cancel or (ProgressPosition >= ProgressMax) then
        begin
          Timer1.Enabled := False;
          Hide;
          Exit;
        end;
      ProgressStepIt;
    end;
end;

However, the condition (ProgressPosition >= ProgressMax) is never satisfied; when the progress reaches its end, it just starts again. Debugging shows that while the component is updated visually by ProgressStepIt, the value of ProgressPosition never changes from 0.
TagsNo tags attached.

Activities

obones

2005-06-01 05:57

administrator   ~0007376

This is confirmed in D7

obones

2005-06-01 06:07

administrator   ~0007377

This is now in CVS.
To fix it in your copy, go into the ProgressStepIt function in JvProgressComponent.pas and replace "FProgressBar.StepIt" by the code below:

    Inc(FProgressPosition, ProgressStep);
    if ProgressPosition > ProgressMax then
      FProgressPosition := ProgressMax
    else if ProgressPosition < ProgressMin then
      FProgressPosition := ProgressMin
    else
      FProgressBar.StepIt;

Cheers
Olivier

Issue History

Date Modified Username Field Change
2005-05-30 06:22 mholmes New Issue
2005-06-01 05:57 obones Note Added: 0007376
2005-06-01 05:57 obones Status new => confirmed
2005-06-01 06:07 obones Status confirmed => resolved
2005-06-01 06:07 obones Resolution open => fixed
2005-06-01 06:07 obones Assigned To => obones
2005-06-01 06:07 obones Note Added: 0007377