HTML_Progress
[ class tree: HTML_Progress ] [ index: HTML_Progress ] [ all elements ]
Prev Next

Expert Guide

learn how to use HTML_Progress, advanced features

by by Laurent Laville
mailto:pear@laurent-laville.org
November 2003, Laurent Laville
(HTML_Progress 1.0+)

Table of Contents

Introduction

After you see a progress bar (Running HTML_Progress) and a progress monitor in action (Using Progress Monitor), next chapter can help you figure out which is appropriate for your application.

Deciding whether to use a Progress Bar or a Progress Monitor

Use a progress bar if:

  • You want more control over the configuration of the progress bar. If you are working directly with a progress bar, you can set it to be indeterminate, make it display vertically, provide a string for it to display, register listeners on it, and provide it with a bounded range model to control the progress bar's minimum, maximum, increment and current values.

  • Your program needs to display others components along with the progress bar.

  • You need more than one progress bar. With some tasks, you need to monitor more than one parameter. For example, an installation program might monitor disk space usage in addition to how many files have been successfully installed.

  • Use a progress monitor if:

  • You want an easy way to display progress in a dialog.

  • The running task is secondary and the user might not be interested in the progress of the task. Progress monitor provides a way for user to dismiss the dialog while the task is still running.

  • You want an easy way for the task to be cancelled. Progress Monitor provides a GUI for the user to cancel the task. All you have to do is call HTML_Progress_Monitor::isCanceled() method to find out if the user pressed the Cancel button.

  • The task might not take a long time to complete. You decide at what point a running task is taking long enough to warrant letting the user know about it.

  • Prev Up Next
    Beginner Guide HTML_Progress 1.x Tutorial Using Progress Observers

    Documentation generated on Mon, 11 Mar 2019 13:52:36 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.