<?php class Textarea02 extends Page{ public function InitializeComponent() { parent::$PAGE_TITLE = "Tutorial : Simple TextArea with auto height";
$this->render = new TextArea($this); $text = "TextArea with\nauto height\nand carriage return\n"; $text .= "Write text in this area to try auto height !!!"; $this->render->setValue($text); $this->render->setAutoHeight(); $this->render->setWidth(350); } } ?>
$textarea = new TextArea($this->render); $textarea->setValue("TextArea with LiveValidation"); $lv = new LiveValidation(); $lv->addValidatePresence(); $textarea->setLiveValidation($lv); $textarea->setWidth(300);
$this->textarea = new TextArea($this->render); $this->textarea->setValue("TextArea with onchange event"); $this->textarea->setWidth(300); $this->textarea->onChange("onChangeTextArea");
$this->render->setContent($this->textarea); }
public function onChangeTextArea($sender) { alert("TextArea value : ".$this->textarea->getValue()); } } ?>
<?php class Textarea05 extends Page{ public function InitializeComponent() { parent::$PAGE_TITLE = "Tutorial : TextArea with height and width defined and no wrap text";
$this->render = new TextArea($this); $text = "TextArea with height\n"; $text .= "and width defined and no wrap text\n"; $text .= "This is a loooooooooooooooooonnnnnnnnnnnnnnnnnnnnnnnnnggggggggggggg string"; $this->render->setValue($text); $this->render->noWrap()->setHeight(100)->setWidth(300); } } ?>