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

setBorderPainted Manual

determines whether the progress bar should paint its border

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

Synopsis

void setBorderPainted( $paint )

Attributes

Name Type Default
paint  boolean   false | [ true ]  

Description

The setBorderPainted() method is used to decide whether the progress bar should paint its border or not. The default value is false: progress bar without border.

Example

Example below will produced a progress bar with a solid red border. It's a static example, the progress bar will not run.

  1. <?php
  2. require_once ('HTML/Progress.php');
  3.  
  4. $bar = new HTML_Progress();
  5. $bar->setBorderPainted(true);
  6.  
  7. $ui =$bar->getUI();
  8. $ui->setBorderAttributes(array(
  9.         'width' => 2,
  10.         'style' => 'solid',
  11.         'color' => 'red'
  12.         ));
  13.  
  14. ?>
  15. <!DOCTYPE html
  16.     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  17.     "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  18.  
  19. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  20. <head>
  21. <title>ProgressBar </title>
  22. <style type="text/css">
  23. <!--
  24. <?php echo $bar->getStyle()?>
  25. // -->
  26. </style>
  27. <body>
  28.  
  29. <?php echo $bar->toHtml()?>
  30.  
  31. </body>
  32. </html>

See Also

Take care that setBorderPainted() method is not enough to display a border. You should also defines border attributes. To do it see setBorderAttributes Manual.

Prev   Next
setStringPainted Manual setBorderAttributes Manual

Documentation generated on Mon, 11 Mar 2019 10:15:06 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.