From 42db97084f62f15e844cd8db1d32a70903490395 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 3 Mar 2006 17:45:47 +0000 Subject: Fixed a bug in rendering TPanel style fields. --- framework/Web/UI/WebControls/TPanel.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'framework') diff --git a/framework/Web/UI/WebControls/TPanel.php b/framework/Web/UI/WebControls/TPanel.php index ed2a7f44..4e010ed2 100644 --- a/framework/Web/UI/WebControls/TPanel.php +++ b/framework/Web/UI/WebControls/TPanel.php @@ -267,10 +267,10 @@ class TPanelStyle extends TStyle */ public function addAttributesToRender($writer) { - if(($url=trim($this->_backImageUrl))!=='') + if(($url=trim($this->getBackImageUrl()))!=='') $this->setStyleField('background-image','url('.$url.')'); - switch($this->_scrollBars) + switch($this->getScrollBars()) { case 'Horizontal': $this->setStyleField('overflow-x','scroll'); break; case 'Vertical': $this->setStyleField('overflow-y','scroll'); break; @@ -278,16 +278,19 @@ class TPanelStyle extends TStyle case 'Auto': $this->setStyleField('overflow','auto'); break; } - if($this->_horizontalAlign!=='NotSet') - $this->setStyleField('text-align',strtolower($this->_horizontalAlign)); + if(($align=$this->getHorizontalAlign())!=='NotSet') + $this->setStyleField('text-align',strtolower($align)); - if(!$this->_wrap) + if(!$this->getWrap()) $this->setStyleField('white-space','nowrap'); - if($this->_direction==='LeftToRight') - $this->setStyleField('direction','ltr'); - else if($this->_direction==='RightToLeft') - $this->setStyleField('direction','rtl'); + if(($direction=$this->getDirection())!=='NotSet') + { + if($direction==='LeftToRight') + $this->setStyleField('direction','ltr'); + else + $this->setStyleField('direction','rtl'); + } parent::addAttributesToRender($writer); } -- cgit v1.2.3