Пример #1
0
 /**
  * Class Constructor
  * @param  $name widget's name
  * @param  $text widget's name
  */
 public function __construct($name, $text_name)
 {
     // executes the parent class constructor
     parent::__construct($name);
     $this->text_name = $text_name;
     // creates the default field style
     $style1 = new TStyle('tcombo');
     $style1->height = '24px';
     $style1->z_index = '1';
     $style1->show();
     // creates a <select> tag
     $this->tag = new TElement('select');
     $this->tag->{'class'} = 'tcombo';
     // CSS
 }
Пример #2
0
 /**
  * Shows the tag
  */
 public function show()
 {
     $stylename = 'style_' . $this->{'id'};
     $style = new TStyle($stylename);
     if (!$this->transparency) {
         $style->border = '1px solid #c2c2c2';
         $style->background = '#ffffff';
     }
     $style->padding = "{$this->margin}px";
     $style->width = $this->width . 'px';
     $style->height = $this->height . 'px';
     // show the style
     $style->show();
     $this->{'class'} = "tscroll {$stylename}";
     parent::show();
 }