NoString

Overview

This example will run a basic horizontal progress bar without percent text info.

Screenshot

sample 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 14) between each step of 10% (line 15).

The percent label is removed on the class constructor (line 13) with last parameter sets to false.

There are 10 cells with default values:

Property Value Default
active-color   #006600
inactive-color   #CCCCCC
width   15
height   20
spacing   2
See also :

Source Code

  1. <?php
  2. /**
  3. * Horizontal progress bar without string (text info).
  4. *
  5. * @version    $Id: nostring.php,v 1.4 2006/05/24 08:47:05 farell Exp $
  6. * @author     Laurent Laville <pear@laurent-laville.org>
  7. * @package    HTML_Progress2
  8. * @subpackage Examples
  9. * @access     public
  10. */
  11. require_once 'HTML/Progress2.php';
  12.  
  13. $pb = new HTML_Progress2(null, HTML_PROGRESS2_BAR_HORIZONTAL, 0, 100, false);
  14. $pb->setAnimSpeed(200);
  15. $pb->setIncrement(10);
  16. ?>
  17. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  18.     "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  19. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  20. <head>
  21. <title>NoString Progress2 example</title>
  22. <style type="text/css">
  23. <!--
  24. <?php echo $pb->getStyle(); ?>
  25.  
  26. body {
  27.     background-color: #FFFFFF;
  28. }
  29.  -->
  30. </style>
  31. <?php echo $pb->getScript(false); ?>
  32. </head>
  33. <body>
  34.  
  35. <?php
  36. $pb->display();
  37. $pb->run();
  38. ?>
  39.  
  40. </body>
  41. </html>