1 |
<?php |
2 |
/** |
3 |
* This file contains the base FEBoxElement class |
4 |
* |
5 |
* $Id: FEBoxElement.inc,v 1.3 2003/02/18 23:01:56 hemna Exp $ |
6 |
* |
7 |
* @author Walter A. Boring IV <waboring@buildabetterweb.com> |
8 |
* @author Suren Markosyan <suren@bcsweb.com> |
9 |
* @package phpHtmlLib |
10 |
* @subpackage FormProcessing |
11 |
* |
12 |
* @copyright LGPL - See LICENCE |
13 |
* |
14 |
*/ |
15 |
|
16 |
/** |
17 |
* This is the Box FormElement which builds a |
18 |
* DIV with a width and a height. It is a base |
19 |
* class for more complicated FormElements. |
20 |
* |
21 |
* |
22 |
* @author Walter A. Boring IV <waboring@buildabetterweb.com> |
23 |
* @author Suren Markossian <suren@bcsweb.com> |
24 |
* @package phpHtmlLib |
25 |
* @subpackage FormProcessing |
26 |
* |
27 |
* @copyright LGPL - See LICENCE |
28 |
*/ |
29 |
class FEBoxElement extends FormElement { |
30 |
|
31 |
/** |
32 |
* Holds the width of the element |
33 |
* |
34 |
*/ |
35 |
var $_width = NULL; |
36 |
|
37 |
/** |
38 |
* Holds the height of the element |
39 |
* |
40 |
*/ |
41 |
var $_height = NULL; |
42 |
|
43 |
/** |
44 |
* The constructor |
45 |
* |
46 |
* @param label string - text label for the element |
47 |
* @param bool required - is this a required element |
48 |
* @param int required - element width in pixels (px), percentage (%) or elements (em) |
49 |
* @param int required - element height in pixels (px), percentage (%) or elements (em) |
50 |
*/ |
51 |
function FEBoxElement($label, $required = TRUE, $width = NULL, $height = NULL) { |
52 |
$this->FormElement($label, $required); |
53 |
|
54 |
if ($width != NULL) { |
55 |
if (is_numeric($width)) |
56 |
$this->set_attribute("size", $width); |
57 |
else |
58 |
$this->set_style_attribute("width", $width); |
59 |
|
60 |
$this->_width = $width; |
61 |
} |
62 |
|
63 |
if ($height != NULL) { |
64 |
$this->set_style_attribute("height", $height); |
65 |
$this->_height = $height; |
66 |
} |
67 |
} |
68 |
} |
69 |
?> |