ProgressBar
ProgressBar는 어떤 작업의 진행상태를 점진적인 Bar의 형태로 표현하고자 할 때 사용하는 Component 입니다.
Progressbar_step_0
step
ProgressBar의 속성 중 step를 이용하여 증가/감소 값을 지정할 수 있습니다.
timer 를 이용한 step 증가시키기
ProgressBar는 step증가/감소에 따라 화면에 변경되는 사항을 볼 수 있습니다. 따라서 ProgressBar의 동작상태를 확인하기 위해 form의 이벤트 ontimer를 이용하여 step를 변경하는 방법입니다.
form의 onload 이벤트에서 Timer 설정하기
this.progress_onload = function (obj:Form, e:LoadEventInfo)
{
this.setTimer(0, 1000);
this.setTimer(1, 1000);
this.setTimer(2, 1000);
}form의 ontimer이벤트
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();
}
}- 소스 위치
Sample\ProgressBar\np_ProgressBar_BasicFunctions.xfdl