public function __construct() { parent::__construct('table'); $this->setHtmlOption('class', ''); $this->addHtmlOption('style', 'width: auto;'); }
$submit->setHtmlOption('type', 'submit'); $submit->setHtmlOption('value', 'Send'); $form->add($bottomPanel); foreach ($allLabels as $label) { $label->setColor('darkred'); $label->addHtmlOption('style', 'font-weight: bold;'); } $form->setId('myform'); $form->setHtmlOption('method', 'post'); $form->setHtmlOption('action', CHtml::normalizeUrl(array('/site/test'))); $form->setWidth('200px'); $form->render(); ?> <?php $mainpanel = new JamVertPanel(); $mainpanel->addHtmlOption('style', 'width: 500px;'); $title = new JamElement("h1", "My Title"); $panel1 = new JamHorzPanel(); $panel2 = new JamHorzPanel(); $mainpanel->add($title); $mainpanel->add($panel1); $mainpanel->add($panel2); $lpanel = new JamVertPanel(); $panel1->add($lpanel); $panel1->add('large text here'); $lpanel->add(new JamImage('images/sample1.png')); $lpanel->add(CHtml::textArea('text at left built using CHtml', 'demo text')); // styles applied to child elements when calling the 'add' method. $panel2->addChildHtmlOptions(array('style' => 'border: 3px solid gray; width: 150px; height: 100px; text-align: center; margin: 3px;')); $panel2->add(new JamElement("b", "bold text"));