we swap from indeterminate mode to determinate mode
              and run a standard progress bar from 0 to 100%
           */
        if ($progressValue == 60) {
            $bar->setIndeterminate(false);
            $bar->setString(null);
            // show percent-info
            $bar->setValue(0);
        }
    }
}
$monitor = new HTML_Progress_Monitor('frmMonitor4', array('button' => array('style' => 'width:80px;')));
$monitor->setProgressHandler('myFunctionHandler');
$progress = new HTML_Progress();
$progress->setAnimSpeed(20);
$progress->setUI('Progress_ITDynamic');
// Attach a progress ui-model
$progress->setStringPainted(true);
// get space for the string
$progress->setString("");
// but don't paint it
$progress->setIndeterminate(true);
// Progress start in indeterminate mode
$monitor->setProgressElement($progress);
?>
<html>
<head>
<title>ProgressBar Monitor - Default renderer </title>
<style type="text/css">
<!--
body {
Exemple #2
0
 * @ignore
 */
class myClassHandler
{
    function myMethodHandler($progressValue, &$bar)
    {
        if (fmod($progressValue, 10) == 0) {
            echo "myMethodHandler -> progress value is = {$progressValue} <br/>\n";
        }
        $bar->sleep();
    }
}
$obs = new myClassHandler();
$monitor = new HTML_Progress_Monitor('frmMonitor3', array('button' => array('style' => 'width:80px;')));
$progress = new HTML_Progress();
$progress->setUI('Progress_Default2');
// Attach a progress ui-model
$progress->setAnimSpeed(20);
$progress->setProgressHandler(array(&$obs, 'myMethodHandler'));
$monitor->setProgressElement($progress);
?>
<html>
<head>
<title>ProgressBar Monitor - Default renderer </title>
<style type="text/css">
<!--
.progressStatus {
    color:#000000;
    font-size:10px;
}
<?php 
<?php

require_once 'HTML/Progress.php';
class Progress_ITDynamic extends HTML_Progress_UI
{
    function Progress_ITDynamic()
    {
        parent::HTML_Progress_UI();
        $this->setCellCount(20);
        $this->setProgressAttributes('background-color=#EEE');
        $this->setStringAttributes('background-color=#EEE color=navy');
        $this->setCellAttributes('inactive-color=#FFF active-color=#444444');
    }
}
$bar = new HTML_Progress();
$bar->setUI('Progress_ITDynamic');
$ui =& $bar->getUI();
print_r($ui);