cvs: pear /HTML_Progress/examples/indeterminate half_basic.html half_basic.php half_monitor.html half_monitor.php
| From: | Laurent Laville | Date: | Sun, 27 Jun 2004 13:36:45 +0000 |
| Subject: | cvs: pear /HTML_Progress/examples/indeterminate half_basic.html half_basic.php half_monitor.html half_monitor.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-21187@lists.php.net to get a copy of this message | ||
farell Sun Jun 27 09:36:45 2004 EDT
Added files:
/pear/HTML_Progress/examples/indeterminate half_basic.html
half_basic.php
half_monitor.html
half_monitor.php
Log:
HTML_Progress examples reorganized by category
http://cvs.php.net/co.php/pear/HTML_Progress/examples/indeterminate/half_basic.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/indeterminate/half_basic.html +++ pear/HTML_Progress/examples/indeterminate/half_basic.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, indeterminate, progress meter" /> <meta name="description" content"="HTML_Progress begin in indeterminate mode and finish process in determinate mode" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Half Indeterminate</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Half Indeterminate </span></h1> <p align="right">$Date: 2004/06/27 13:36:44 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> <p>This example requires : <ul> <li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at line 12).</li> </ul> </p> <hr/> <p><b>This example will run a basic ProgressBar in indeterminate mode (without monitor) until it reached a limit-level (elapse time > 12 seconds).</b></p> <p>Actions to wait are allowed by user callback myProgressHandler defined on lines 20 to 41.</p> <p>This callback is attached on progress bar at line 61. If you forget to do that, default will be to wait, done by HTML_Progress::sleep() method.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar : <pre> background-color = #e0e0e0 </pre> <div class="fig">HTML_Progress_UI::setProgressAttributes()</div> Here are options to build this progress bar string (percent text info): <pre> color = #996 background-color = #CCCC99 </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> Here are options to build the progress bar cells : <pre> active-color = #996 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> Here are options to run the progress bar : <pre> speed = 200 increment = 10 </pre> <div class="fig">HTML_Progress::setAnimSpeed()</div> <div class="fig">HTML_Progress::setIncrement()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/indeterminate_half_basic.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=indeterminate/half_basic.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="half_basic.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/indeterminate/half_basic.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/indeterminate/half_basic.php +++ pear/HTML_Progress/examples/indeterminate/half_basic.php <?php @include '../include_path.php'; /** * Horizontal ProgressBar in indeterminate mode * without using the Progress_Monitor V2 solution. * * @version $Id: half_basic.php,v 1.1 2004/06/27 13:36:44 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; /** * This user callback process simulate a reply given after 12 seconds * Parameters * 1. current value of the progress bar * 2. the progress bar (object) itself */ function myProgressHandler($progressValue, &$bar) { static $c; if (!isset($c)) { $c = time(); } // wait a bit ... $bar->sleep(); /* rules to determine when switch back from indeterminate to determinate mode */ $elapse = time() - $c; echo "myProgressHandler -> elapse time = $elapse s.<br/>\n"; if ($elapse >= 12) { if ($bar->isIndeterminate()) { $bar->setIndeterminate(false); $bar->setValue(100); } } } $progress = new HTML_Progress(); $ui = & $progress->getUI(); $ui->setProgressAttributes(array( 'background-color' => '#e0e0e0' )); $ui->setStringAttributes(array( 'color' => '#996', 'background-color' => '#CCCC99' )); $ui->setCellAttributes(array( 'active-color' => '#996' )); $progress->setAnimSpeed(200); $progress->setIncrement(10); $progress->setStringPainted(true); // get space for the string $progress->setString(""); // but don't paint it $progress->setIndeterminate(true); // Progress start in indeterminate mode $progress->setProgressHandler('myProgressHandler'); ?> <html> <head> <title>Basic Indeterminate Mode Progress example</title> <style type="text/css"> <!-- body { background-color: #CCCC99; color: #996; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: yellow; } <?php echo $progress->getStyle(); ?> // --> </style> <script type="text/javascript"> <!-- <?php echo $progress->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $progress->toHtml(); $progress->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/indeterminate/half_monitor.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/indeterminate/half_monitor.html +++ pear/HTML_Progress/examples/indeterminate/half_monitor.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, indeterminate, progress meter, monitor" /> <meta name="description" content"="HTML_Progress begin in indeterminate mode and finish process in determinate mode" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Half Indeterminate and Monitor</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Half Indeterminate and Monitor</span></h1> <p align="right">$Date: 2004/06/27 13:36:44 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> <p>This example requires : <ul> <li>PEAR::HTML_Progress 1.2.0RC1 or better (see source at line 12).</li> </ul> </p> <hr/> <p><b>This example will run a basic ProgressBar in indeterminate mode (with monitor) then switch back to determinate mode when reached a limit-level (internal value > 240).</b></p> <p>Actions to switch back to determinate mode are allowed by user callback myProgressHandler defined on lines 14 to 38.</p> <p>This callback is attached on progress bar at line 46 and monitor renders are defined on lines 102 to 114 (following QF rendering rules).</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar : <pre> background-color = #e0e0e0 </pre> <div class="fig">HTML_Progress_UI::setProgressAttributes()</div> Here are options to build this progress bar string (percent text info): <pre> color = #996 background-color = #CCCC99 </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> Here are options to build the progress bar cells : <pre> active-color = #996 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> Here are options to run the progress bar : <pre> speed = 100 increment = 10 </pre> <div class="fig">HTML_Progress::setAnimSpeed()</div> <div class="fig">HTML_Progress::setIncrement()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/indeterminate.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=indeterminate/half_monitor.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="half_monitor.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/indeterminate/half_monitor.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/indeterminate/half_monitor.php +++ pear/HTML_Progress/examples/indeterminate/half_monitor.php <?php @include '../include_path.php'; /** * Horizontal ProgressBar in indeterminate mode * using the Progress_Monitor V2 solution (with QF renderer). * * @version $Id: half_monitor.php,v 1.1 2004/06/27 13:36:44 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress/monitor.php'; function myProgressHandler($progressValue, &$obj) { static $c; if (!isset($c)) { $c = 0; } $c += 16; $obj->setCaption("completed $c out of 400"); $bar =& $obj->getProgressElement(); /* rules to determine when switch back from indeterminate to determinate mode */ if ($c >= 240 && $bar->isIndeterminate()) { $bar->setIndeterminate(false); $bar->setString(null); // show percent-info $bar->setValue(0); } if ($bar->getPercentComplete() == 1) { if ($bar->isIndeterminate()) { $bar->setValue(0); } else { $bar->setString(''); // hide percent-info } } } $monitor = new HTML_Progress_Monitor('frmMonitor', array( 'button' => array('style' => 'width:80px;'), 'title' => 'Progress ...' ) ); // your custom user process goes here ! $monitor->setProgressHandler('myProgressHandler'); // Attach a progress bar custom model $progress = new HTML_Progress(); $ui = & $progress->getUI(); $ui->setProgressAttributes(array( 'background-color' => '#e0e0e0' )); $ui->setStringAttributes(array( 'color' => '#996', 'background-color' => '#CCCC99' )); $ui->setCellAttributes(array( 'active-color' => '#996' )); $progress->setAnimSpeed(100); $progress->setIncrement(10); $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>Indeterminate Mode Progress example</title> <style type="text/css"> <!-- progressStatus { color:#000000; font-size:10px; } body { background-color: #444444; color: #EEEEEE; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: yellow; } <?php echo $monitor->getStyle(); ?> // --> </style> <script type="text/javascript"> <!-- <?php echo $monitor->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php $renderer =& HTML_QuickForm::defaultRenderer(); $renderer->setFormTemplate(' <table width="450" border="0" cellpadding="3" cellspacing="2" bgcolor="#CCCC99"> <form{attributes}>{content} </form> </table> '); $renderer->setHeaderTemplate(' <tr> <td style="white-space:nowrap;background:#996;color:#ffc;" align="left" colspan="2"><b>{header}</b></td> </tr> '); $monitor->accept($renderer); // Display progress monitor dialog box echo $renderer->toHtml(); $monitor->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html>
http://cvs.php.net/co.php/pear/HTML_Progress/examples/indeterminate/half_basic.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/indeterminate/half_basic.html +++ pear/HTML_Progress/examples/indeterminate/half_basic.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, indeterminate, progress meter" /> <meta name="description" content"="HTML_Progress begin in indeterminate mode and finish process in determinate mode" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Half Indeterminate</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Half Indeterminate </span></h1> <p align="right">$Date: 2004/06/27 13:36:44 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> <p>This example requires : <ul> <li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at line 12).</li> </ul> </p> <hr/> <p><b>This example will run a basic ProgressBar in indeterminate mode (without monitor) until it reached a limit-level (elapse time > 12 seconds).</b></p> <p>Actions to wait are allowed by user callback myProgressHandler defined on lines 20 to 41.</p> <p>This callback is attached on progress bar at line 61. If you forget to do that, default will be to wait, done by HTML_Progress::sleep() method.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar : <pre> background-color = #e0e0e0 </pre> <div class="fig">HTML_Progress_UI::setProgressAttributes()</div> Here are options to build this progress bar string (percent text info): <pre> color = #996 background-color = #CCCC99 </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> Here are options to build the progress bar cells : <pre> active-color = #996 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> Here are options to run the progress bar : <pre> speed = 200 increment = 10 </pre> <div class="fig">HTML_Progress::setAnimSpeed()</div> <div class="fig">HTML_Progress::setIncrement()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/indeterminate_half_basic.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=indeterminate/half_basic.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="half_basic.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/indeterminate/half_basic.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/indeterminate/half_basic.php +++ pear/HTML_Progress/examples/indeterminate/half_basic.php <?php @include '../include_path.php'; /** * Horizontal ProgressBar in indeterminate mode * without using the Progress_Monitor V2 solution. * * @version $Id: half_basic.php,v 1.1 2004/06/27 13:36:44 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; /** * This user callback process simulate a reply given after 12 seconds * Parameters * 1. current value of the progress bar * 2. the progress bar (object) itself */ function myProgressHandler($progressValue, &$bar) { static $c; if (!isset($c)) { $c = time(); } // wait a bit ... $bar->sleep(); /* rules to determine when switch back from indeterminate to determinate mode */ $elapse = time() - $c; echo "myProgressHandler -> elapse time = $elapse s.<br/>\n"; if ($elapse >= 12) { if ($bar->isIndeterminate()) { $bar->setIndeterminate(false); $bar->setValue(100); } } } $progress = new HTML_Progress(); $ui = & $progress->getUI(); $ui->setProgressAttributes(array( 'background-color' => '#e0e0e0' )); $ui->setStringAttributes(array( 'color' => '#996', 'background-color' => '#CCCC99' )); $ui->setCellAttributes(array( 'active-color' => '#996' )); $progress->setAnimSpeed(200); $progress->setIncrement(10); $progress->setStringPainted(true); // get space for the string $progress->setString(""); // but don't paint it $progress->setIndeterminate(true); // Progress start in indeterminate mode $progress->setProgressHandler('myProgressHandler'); ?> <html> <head> <title>Basic Indeterminate Mode Progress example</title> <style type="text/css"> <!-- body { background-color: #CCCC99; color: #996; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: yellow; } <?php echo $progress->getStyle(); ?> // --> </style> <script type="text/javascript"> <!-- <?php echo $progress->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $progress->toHtml(); $progress->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/indeterminate/half_monitor.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/indeterminate/half_monitor.html +++ pear/HTML_Progress/examples/indeterminate/half_monitor.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" /> <meta name="keywords" content"="HTML_Progress, indeterminate, progress meter, monitor" /> <meta name="description" content"="HTML_Progress begin in indeterminate mode and finish process in determinate mode" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Half Indeterminate and Monitor</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Half Indeterminate and Monitor</span></h1> <p align="right">$Date: 2004/06/27 13:36:44 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#output">Ouput</a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> <p>This example requires : <ul> <li>PEAR::HTML_Progress 1.2.0RC1 or better (see source at line 12).</li> </ul> </p> <hr/> <p><b>This example will run a basic ProgressBar in indeterminate mode (with monitor) then switch back to determinate mode when reached a limit-level (internal value > 240).</b></p> <p>Actions to switch back to determinate mode are allowed by user callback myProgressHandler defined on lines 14 to 38.</p> <p>This callback is attached on progress bar at line 46 and monitor renders are defined on lines 102 to 114 (following QF rendering rules).</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar : <pre> background-color = #e0e0e0 </pre> <div class="fig">HTML_Progress_UI::setProgressAttributes()</div> Here are options to build this progress bar string (percent text info): <pre> color = #996 background-color = #CCCC99 </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> Here are options to build the progress bar cells : <pre> active-color = #996 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> Here are options to run the progress bar : <pre> speed = 100 increment = 10 </pre> <div class="fig">HTML_Progress::setAnimSpeed()</div> <div class="fig">HTML_Progress::setIncrement()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/indeterminate.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=indeterminate/half_monitor.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="half_monitor.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/indeterminate/half_monitor.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/indeterminate/half_monitor.php +++ pear/HTML_Progress/examples/indeterminate/half_monitor.php <?php @include '../include_path.php'; /** * Horizontal ProgressBar in indeterminate mode * using the Progress_Monitor V2 solution (with QF renderer). * * @version $Id: half_monitor.php,v 1.1 2004/06/27 13:36:44 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress/monitor.php'; function myProgressHandler($progressValue, &$obj) { static $c; if (!isset($c)) { $c = 0; } $c += 16; $obj->setCaption("completed $c out of 400"); $bar =& $obj->getProgressElement(); /* rules to determine when switch back from indeterminate to determinate mode */ if ($c >= 240 && $bar->isIndeterminate()) { $bar->setIndeterminate(false); $bar->setString(null); // show percent-info $bar->setValue(0); } if ($bar->getPercentComplete() == 1) { if ($bar->isIndeterminate()) { $bar->setValue(0); } else { $bar->setString(''); // hide percent-info } } } $monitor = new HTML_Progress_Monitor('frmMonitor', array( 'button' => array('style' => 'width:80px;'), 'title' => 'Progress ...' ) ); // your custom user process goes here ! $monitor->setProgressHandler('myProgressHandler'); // Attach a progress bar custom model $progress = new HTML_Progress(); $ui = & $progress->getUI(); $ui->setProgressAttributes(array( 'background-color' => '#e0e0e0' )); $ui->setStringAttributes(array( 'color' => '#996', 'background-color' => '#CCCC99' )); $ui->setCellAttributes(array( 'active-color' => '#996' )); $progress->setAnimSpeed(100); $progress->setIncrement(10); $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>Indeterminate Mode Progress example</title> <style type="text/css"> <!-- progressStatus { color:#000000; font-size:10px; } body { background-color: #444444; color: #EEEEEE; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: yellow; } <?php echo $monitor->getStyle(); ?> // --> </style> <script type="text/javascript"> <!-- <?php echo $monitor->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php $renderer =& HTML_QuickForm::defaultRenderer(); $renderer->setFormTemplate(' <table width="450" border="0" cellpadding="3" cellspacing="2" bgcolor="#CCCC99"> <form{attributes}>{content} </form> </table> '); $renderer->setHeaderTemplate(' <tr> <td style="white-space:nowrap;background:#996;color:#ffc;" align="left" colspan="2"><b>{header}</b></td> </tr> '); $monitor->accept($renderer); // Display progress monitor dialog box echo $renderer->toHtml(); $monitor->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html>