ProgressBar

ProgressBar Basic

Progress Bar is a component which shows a gradual progress of output data which is represented in the form of Bar.

Progressbar_step_0

step

Using the increment/decrement properties of the ProgressBar step values can be specified.

Using a timer to increase step

Progress Bar moves step up and down on the screen, you can see real progress of the changes. We can use ontimer event of the form to know the progress of the work. We can set step value which means how much increment or decrement in progress bar movement.

Setting timer on onload event of the form

this.progress_onload = function (obj:Form, e:LoadEventInfo)
{
 this.setTimer(0,1000);
 this.setTimer(1,1000);
 this.setTimer(2,1000);
}

ontimer event of the form

this.progress_ontimer = function (obj:Form, e:TimerEventInfo)
{
 if (e.timerid == 0) 
 {
  if (this.ProgressBar01.pos == this.ProgressBar01.max) 
  {
   return;
  }
  this.ProgressBar01.stepIt();
 }
 else if (e.timerid == 1) 
 {
  if (this.ProgressBar02.pos == this.ProgressBar02.max) 
  {
   return;
  }
  this.ProgressBar02.stepIt();
 }
 else if (e.timerid == 2) 
 {
  if (this.ProgressBar03.pos == this.ProgressBar03.max) 
  {
   return;
  }
  this.ProgressBar03.stepIt();
 }
}

Source Location

Sample\ProgressBar\np_ProgressBar_BasicFunctions.xfdl