/** * Constructor method */ public function __construct() { parent::__construct('search_box'); $this->form = new TForm('search_box'); $input = new TMultiSearch('input'); $input->setSize(240, 28); $input->addItems($this->getPrograms()); $input->setMinLength(1); $input->setMaxSize(1); $input->setChangeAction(new TAction(array('SearchBox', 'loadProgram'))); $this->form->add($input); $this->form->setFields(array($input)); parent::add($this->form); }
/** * Constructor method */ public function __construct() { parent::__construct('serach_box'); $this->form = new TForm('search_box'); $table = new TTable(); $table->style = 'float:right'; $row = $table->addRow(); $input = new TMultiSearch('input'); $input->setSize(240, 28); $input->addItems($this->getPrograms()); $input->setMinLength(1); $input->setMaxSize(1); $button = new TButton('search'); $button->style = 'margin-top:0px; height:30px;'; $button->setImage('bs:search green'); $button->setAction(new TAction(array($this, 'loadProgram'))); $this->form->setFields(array($input, $button)); $row->addCell($input); $row->addCell($button); $this->form->add($table); parent::add($this->form); }