HTML_Progress::setBorderPainted

HTML_Progress

Prev |  | Next
HTML_Progress::setBorderPainted decides to paint or not a border around a progress bar ## Synopsis require_once 'HTML/Progress.php'; void HTML_Progress::setBorderPainted( bool $paint) ## Description This method is used to decide whether the progress bar should paint its border or not. Default behavior is progress meter with no border painted. ## Parameter boolean $paint whether the progress meter should render a border ## Throws

Possible PEAR_Error values

Error level | Error code | Error message | Solution
exception | HTML_PROGRESS_ERROR_INVALID_INPUT | invalid input, parameter #1 "$paint" was expecting "boolean" | Fixed the cast of parameter
## Note ( HTML_Progress >= 1.0 )
| This function can not be called statically.
## See HTML_Progress::isBorderPainted, HTML_Progress_UI::setBorderAttributes ## Example Example below will produced a progress bar with a solid red border.

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

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

    $ui =& $bar->getUI();
    $ui->setBorderAttributes(array(
            'width' => 2,
            'style' => 'solid',
            'color' => 'red'
            ));
    ?>
    <!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>setBorderPainted example </title>
    <style type="text/css">
    <!--
    <?php echo $bar->getStyle(); ?>
    // -->
    </style>
    <body>

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

    </body>
    </html>
Prev | Up | Next
HTML_Progress::isBorderPainted | Reference Guide | HTML_Progress::getUI
Documentation generated on Sun, 12 Sep 2004 20:23:10 +0200 by phpDocumentor 1.3.0RC3