HTML_Progress_UI::setBorderAttributes

HTML_Progress

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

    Key-values allowed are:

    Attribute | Format | Default value
    class | string | progressBarBorder
    width | integer | 0
    style | string | solid
    color | string | #000000
## Note ( HTML_Progress >= 1.0 )
| This function can not be called statically.
| You may also used an existing StyleSheet and a CSS class-selector with pre-defined style. For example:

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

    $bar = new HTML_Progress();
    // specify a user-ident (instead of the auto-generated value)
    $bar->setIdent('PB1');

    $ui =& $bar->getUI();
    $ui->setBorderAttributes('class="myProgressBorder"');
    ?>
could be replaced by:
    <style type="text/css">
    <!--
    .PB1 .myProgressBar { border: 3px dotted #0000FF; }
    // -->
    </style>
## See HTML_Progress_UI::getBorderAttributes, HTML_Progress::setBorderPainted ## Example Example below will produced a progress bar with a solid navy border. It's a static example, the progress bar will not run.

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

    $bar = new HTML_Progress();
    $bar->setBorderPainted(true);

    $ui =& $bar->getUI();
    $ui->setCellAttributes('active-color=#3874B4 inactive-color=#EEEECC width=10');
    $ui->setBorderAttributes('width=1 color=navy');
    $ui->setStringAttributes('width=60 font-size=14 background-color=#EEEEEE');
    ?>
    <!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>setBorderAttributes example </title>
    <style type="text/css">
    <!--
    <?php echo $bar->getStyle(); ?>
    // -->
    </style>
    <body>

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

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