Examples TOCexamples

Complex ProgressBar Observer

$Date: 2004/06/27 13:08:28 $

 Table of contents

Introduction

This example requires :


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 145.

[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]