PEAR::HTML::Progress example: Complex ProgressBar Observer
Author: Laurent Laville

examples

# Complex ProgressBar Observer

$Date: 2005/07/25 12:27:28 $

- Introduction
- Render options
- Output
- PHP source syntax highlight
- Play demo

## Introduction

This example requires :

- PEAR::HTML_Progress 1.2.2 or better (see source at lines 12, 13).

This example will run a complex observer mechanism which run two progress bar. At each full loop of first bar, second bar is increment until this last one reach 100%.

All explains are in source code comments. Just a big warning: NEVER forget the line 144.

[Top]

## Render options

Here are options to build the 1st progress bar :

    background-color = #e0e0e0

HTML_Progress_UI::setProgressAttributes()
Here are options to build the 1st progress bar string :

    valign           = left
    color            = red
    background-color = lightblue

HTML_Progress_UI::setStringAttributes()
Here are options to build the 2nd progress bar border :

    width = 1
    style = solid
    color = navy

HTML_Progress_UI::setBorderAttributes()
Here are options to build the 2nd progress bar cell :

    active-color   = #3874B4
    inactive-color = #EEEECC

HTML_Progress_UI::setCellAttributes()
Here are options to build the 2nd progress bar string :

    width            = 100
    align            = center
    valign           = right
    color            = yellow
    background-color = lightblue

HTML_Progress_UI::setStringAttributes()

[Top]

## Output

### Screenshot

[Top]

## PHP source syntax highlight

Open source listing in a new window.

[Top]

## Play demo

Run the script.

[Top]