Examples TOCexamples

Vertical

$Date: 2005/07/25 11:08:54 $

 Table of contents

Introduction

This example requires :


This example will run a vertical ProgressBar, beginning at value 85, and increased through 100 with +1 step.

Percent text info is right aligned on 50 pixels width area at right side of the progress bar (default).
Cells have default size and colors.

[Top]

 Render options

None. Used all default values.

[Top]

 Output

Screenshot

[Top]

 PHP source syntax highlight

  1. <?php
  2. /**
  3.  * Basic Vertical ProgressBar example.
  4.  *
  5.  * @version    $Id: basic.php,v 1.2 2005/07/25 11:08:54 farell Exp $
  6.  * @author     Laurent Laville <pear@laurent-laville.org>
  7.  * @package    HTML_Progress
  8.  * @subpackage Examples
  9.  */
  10.  
  11. require_once 'HTML/Progress.php';
  12.  
  13. $bar = new HTML_Progress(HTML_PROGRESS_BAR_VERTICAL);
  14. $bar->setAnimSpeed(100);
  15. $bar->setValue(85);
  16. ?>
  17. <html>
  18. <head>
  19. <title>Basic Vertical ProgressBar example</title>
  20. <style type="text/css">
  21. <!--
  22. <?php echo $bar->getStyle(); ?>
  23.  
  24. body {
  25.     background-color: #FFFFFF;
  26.     color: #000000;
  27.     font-family: Verdana, Arial;
  28. }
  29.  
  30. a:visited, a:active, a:link {
  31.     color: navy;
  32. }
  33. // -->
  34. </style>
  35. <script type="text/javascript">
  36. <!--
  37. <?php echo $bar->getScript(); ?>
  38. //-->
  39. </script>
  40. </head>
  41. <body>
  42.  
  43. <?php
  44. echo $bar->toHtml();
  45. $bar->run();
  46. ?>
  47.  
  48. </body>
  49. </html>

[Top]