HTML_Progress::getString

HTML_Progress

Prev |  | Next
HTML_Progress::getString returns the current value of the progress meter string ## Synopsis require_once 'HTML/Progress.php'; string HTML_Progress::getString() ## Description This method is used to retrieve the custom string attached to the progress meter. By default, the progress meter displays the value returned by HTML_Progress::getPercentComplete() method formatted as a percent such as 33%. ## Note ( HTML_Progress >= 1.0 )
| This function can not be called statically.
## See HTML_Progress::setString, HTML_Progress::isStringPainted, HTML_Progress::setStringPainted ## Example Example below will produced a progress bar with a custom string.

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

    $bar = new HTML_Progress();
    $bar->setValue(25);
    $bar->setStringPainted(true);

    $ui =& $bar->getUI();
    $ui->setStringAttributes('width=350 align=left');
    ?>
    <html>
    <head>
    <title>getString example</title>
    <style type="text/css">
    <!--
    <?php echo $bar->getStyle(); ?>
    // -->
    </style>
    <script type="text/javascript">
    <!--
    <?php echo $bar->getScript(); ?>
    //-->
    </script>
    </head>
    <body>

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

    $val = $bar->getValue();
    $msg = "&nbsp; installing package ($val %) ... : Config";
    $bar->setString($msg);

    $bar->display();

    echo '<h1>Progress Meter Custom String</h1>';
    print($bar->getString());
    ?>

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