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

setBorderAttributes Manual

defines look and feel of the progress bar border

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

Synopsis

void setBorderAttributes( $attributes )

Attributes

Name Type Default
attributes array
  • class => progressBarBorder
  • width => 0
  • style => solid (dashed, dotted, inset, outset)
  • color => #000000

$attributes is an associative array or string of HTML tag attributes.

Description

The setBorderAttributes() method is used to give a look and feel, such as size, style and color, to the progress bar border.

You may also used an existing StyleSheet and a CSS class-selector with pre-defined style. For example:

  1. <?php
  2. ...
  3. // specify a user-ident (instead of the auto-generated value)
  4. $bar->setIdent('PB1');  
  5. ...
  6. $ui =$bar->getUI();
  7. $ui->setBorderAttributes('class="myProgressBorder"');
  8. ...
  9. ?>
<!-- custom stylesheet -->
...
.PB1 .myProgressBar { border: 3px dotted #0000FF; }
...
   

Example

Example below will produced a progress bar with a solid navy 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->setCellAttributes('active-color=#3874B4 inactive-color=#EEEECC width=10');
  9. $ui->setBorderAttributes('width=1 color=navy');
  10. $ui->setStringAttributes('width=60 font-size=14 background-color=#EEEEEE');
  11. ?>
  12. <!DOCTYPE html
  13.     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  14.     "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  15.  
  16. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  17. <head>
  18. <title>setBorderAttributes example </title>
  19. <style type="text/css">
  20. <!--
  21. <?php echo $bar->getStyle()?>
  22. // -->
  23. </style>
  24. <body>
  25.  
  26. <?php echo $bar->toHtml()?>
  27.  
  28. </body>
  29. </html>

See Also

setBorderPainted Manual

Prev Up Next
getBorderAttributes Manual Reference Guides getCellAttributes Manual

Documentation generated on Mon, 11 Mar 2019 13:52:35 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.