VLimit
Overview
This example will run a basic vertical progress bar, beginning at 75%,
and increased through 100% by +1 step.
Screenshot
Demonstration
Give it a try
Dependencies
This example requires mandatory resources :
And also but optional :
Explains step by step
The progress meter wait 200ms (line 15)
between each step of 1% (default), and start at 75% (line 16).
Orientation vertical (default is horizontal) is given on line 14.
Percent info is right align in middle of progress bar on line 17 (top shift).
There are 10 cells with default values:
Property | Value | Default |
active-color | | #006600 |
inactive-color | | #CCCCCC |
width | | 20 |
height | | 15 |
spacing | | 2 |
See also :
Source Code
<?php
/**
* Basic vertical progress bar.
*
* @version $Id: vlimit.php,v 1.4 2006/05/24 08:39:13 farell Exp $
* @author Laurent Laville <pear@laurent-laville.org>
* @package HTML_Progress2
* @subpackage Examples
* @access public
*/
require_once 'HTML/Progress2.php';
$pb = new HTML_Progress2();
$pb->setOrientation(HTML_PROGRESS2_BAR_VERTICAL);
$pb->setAnimSpeed(200);
$pb->setValue(75);
$pb->setLabelAttributes('pct1', array('top' => 80));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>VLimit Progress2 example</title>
<style type="text/css">
<!--
<?php echo $pb->getStyle(); ?>
body {
background-color: #FFFFFF;
}
-->
</style>
<?php echo $pb->getScript(false); ?>
</head>
<body>
<?php
$pb->display();
$pb->run();
?>
</body>
</html>