summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TInlineFrame.php
diff options
context:
space:
mode:
authorJens Klaer <kj.landwehr.software@gmail.com>2015-09-04 11:42:33 +0200
committerJens Klaer <kj.landwehr.software@gmail.com>2015-09-04 11:42:33 +0200
commitbfeada5a44e8efc51cf58860170524f64e658bb3 (patch)
tree5dafc0f0e435c5a777918365432044c856af1126 /framework/Web/UI/WebControls/TInlineFrame.php
parent3b24f017567d33e08f60ea1be4cc0b545de0638c (diff)
added width and height properties for convenience
Diffstat (limited to 'framework/Web/UI/WebControls/TInlineFrame.php')
-rw-r--r--framework/Web/UI/WebControls/TInlineFrame.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/framework/Web/UI/WebControls/TInlineFrame.php b/framework/Web/UI/WebControls/TInlineFrame.php
index 09e82315..67ff5830 100644
--- a/framework/Web/UI/WebControls/TInlineFrame.php
+++ b/framework/Web/UI/WebControls/TInlineFrame.php
@@ -146,6 +146,42 @@ class TInlineFrame extends TWebControl implements IDataRenderer
}
/**
+ * @return integer the width of the control
+ */
+ public function getWidth()
+ {
+ return $this->getViewState('Width',-1);
+ }
+
+ /**
+ * @param integer the width of the control
+ */
+ public function setWidth($value)
+ {
+ if(($value=TPropertyValue::ensureInteger($value))<0)
+ $value=-1;
+ $this->setViewState('Width',$value,-1);
+ }
+
+ /**
+ * @return integer the height of the control
+ */
+ public function getHeight()
+ {
+ return $this->getViewState('Height',-1);
+ }
+
+ /**
+ * @param integer the height of the control
+ */
+ public function setHeight($value)
+ {
+ if(($value=TPropertyValue::ensureInteger($value))<0)
+ $value=-1;
+ $this->setViewState('Height',$value,-1);
+ }
+
+ /**
* @return integer the amount of space, in pixels, that should be left between
* the frame's contents and the left and right margins. Defaults to -1, meaning not set.
*/
@@ -212,6 +248,12 @@ class TInlineFrame extends TWebControl implements IDataRenderer
if(($longdesc=$this->getDescriptionUrl())!=='')
$writer->addAttribute('longdesc',$longdesc);
+
+ if (($width=$this->getWidth())!==-1)
+ $writer->addAttribute('width',$width);
+
+ if (($height=$this->getHeight())!==-1)
+ $writer->addAttribute('height',$height);
if(($marginheight=$this->getMarginHeight())!==-1)
$writer->addAttribute('marginheight',$marginheight);