HTML_Progress_UI::setProgressAttributes

HTML_Progress

Prev |  | Next
  - HTML_Progress_UI::setProgressAttributes sets main look and feel of progress meter ## Synopsis require_once 'HTML/Progress/UI.php'; void HTML_Progress_UI::setProgressAttributes( mixed $attributes) ## Description This method is used to give a look and feel, such as size and color, to the core of progress meter. $attributes is an associative array or string of HTML tag attributes. ## Parameter mixed $attributes the new cell attributes of the progress meter.

    Key-values allowed are:

    Attribute | Format | Default value
    class | string | progressBar
    background-color | string | #FFFFFF
    auto-size | boolean | true
    width | integer | (compute)
    height | integer | (compute)
## Note ( HTML_Progress >= 1.0 )
| This function can not be called statically.
## See HTML_Progress_UI::getProgressAttributes, HTML_Progress_UI::setBorderAttributes, HTML_Progress_UI::setStringAttributes, HTML_Progress_UI::setCellAttributes ## Example Example below (that requires HTML_Progress >= 1.2.0RC3) will produced a plain progress bar. It's a dynamic example, the progress bar will run.

    <?php
    require_once 'HTML/Progress.php';

    $bar = new HTML_Progress();
    $bar->setAnimSpeed(100);
    $bar->setIncrement(10);
    $bar->setBorderPainted(true);

    $ui =& $bar->getUI();
    $ui->setCellAttributes(array(
        'active-color' => '#000084',
        'inactive-color' => '#3A6EA5',
        'width' => 20,
        'spacing' => 0
    ));
    $ui->setBorderAttributes('width=1 style=inset color=white');
    $ui->setStringAttributes(array(
        'width' => 200,
        'height' => 20,
        'font-size' => 14,
        'background-color' => '#C3C6C3',
        'valign' => 'top'
    ));
    ?>
    <!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    <title>setProgressAttributes example</title>
    <style type="text/css">
    <!--
    <?php echo $bar->getStyle(); ?>
    // -->
    </style>
    <script type="text/javascript">
    <!--
    <?php echo $bar->getScript(); ?>
    //-->
    </script>
    </head>
    <body bgcolor="#C3C6C3">

    <?php
    echo $bar->toHtml();
    $bar->run();
    ?>

    </body>
    </html>
Prev | Up | Next
HTML_Progress_UI::getProgressAttributes | Reference Guide | HTML_Progress_UI::getScript
Documentation generated on Sun, 12 Sep 2004 20:23:28 +0200 by phpDocumentor 1.3.0RC3