|
|
Tutorial 1 : Simple ComboBox
<?php class Combobox01 extends Page { public function InitializeComponent() { parent::$PAGE_TITLE = "Tutorial : Simple ComboBox"; $this->render = new ComboBox($this); $this->render->addItem("value 1", "value 1"); $this->render->addItem("value 2", "value 2"); $this->render->addItem("value 3", "value 3"); $this->render = new Object($this->render, "<br/>"); } } ?>
Tutorial 2 : Simple ComboBox with picture
<?php class Combobox02 extends Page { public function InitializeComponent() { parent::$PAGE_TITLE = "Tutorial : Simple ComboBox with picture"; $this->render = new ComboBox($this); $this->render->addItem("value 1", "value 1", false, "img/home.png"); $this->render->addItem("value 2", "value 2", false, "img/doc.png"); $this->render->addItem("value 3", "value 3", false, "img/contact.png"); $this->render = new Object($this->render, "<br/>"); } } ?>
Tutorial 3 : Simple ComboBox with picture and group
<?php class Combobox03 extends Page { public function InitializeComponent() { parent::$PAGE_TITLE = "Tutorial : Simple ComboBox with picture and group"; $this->render = new ComboBox($this); $this->render->addItem("value 1", "value 1", false, "img/home.png", "Group 1"); $this->render->addItem("value 2", "value 2", false, "img/doc.png", "Group 1"); $this->render->addItem("value 3", "value 3", false, "img/contact.png", "Group 2"); $this->render = new Object($this->render, "<br/>"); } } ?>
Tutorial 4 : ComboBox with javascript alert on change
<?php class Combobox04 extends Page { public function InitializeComponent() { parent::$PAGE_TITLE = "Tutorial : ComboBox with javascript alert on change"; $this->render = new ComboBox($this); $this->render->addItem("value 1", "value 1"); $this->render->addItem("value 2", "value 2"); $this->render->addItem("value 3", "value 3"); $this->render->onChangeJs("alert('change');"); $this->render = new Object($this->render, "<br/>"); } } ?>
Tutorial 5 : ComboBox with form
<?php class Combobox05 extends Page { public function InitializeComponent() { parent::$PAGE_TITLE = "Tutorial : ComboBox with form"; $form = new Form($this); $combo = new ComboBox($form); $combo->addItem("value 1", "value 1"); $combo->addItem("value 2", "value 2"); $combo->addItem("value 3", "value 3"); $form->setContent($combo); $this->render = $form; $this->render = new Object($this->render, "<br/>"); } } ?>
Tutorial 6 : ComboBox with form, callback method on change
<?php class Combobox06 extends Page { public function InitializeComponent() { parent::$PAGE_TITLE = "Tutorial : ComboBox with form, callback method on change"; $form = new Form($this); $combo = new ComboBox($form); $combo->addItem("value 1", "value 1"); $combo->addItem("value 2", "value 2"); $combo->addItem("value 3", "value 3"); $combo->onChange("onChangeCombo"); $form->setContent($combo); $this->render = $form; $this->render = new Object($this->render, "<br/>"); } public function onChangeCombo($sender) { $this->addObject(new JavaScript("alert('change');")); } } ?>
Tutorial 7 : ComboBox with form, callback method on change in AJAX
<?php class Combobox07 extends Page { private $combo = null; public function InitializeComponent() { parent::$PAGE_TITLE = "Tutorial : ComboBox with form, callback method on change in AJAX"; $form = new Form($this); $this->combo = new ComboBox($form); $this->combo->addItem("value 1", "value 1"); $this->combo->addItem("value 2", "value 2"); $this->combo->addItem("value 3", "value 3"); $this->combo->onChange("onChangeCombo"); $this->combo->setAjaxEvent(); $form->setContent($this->combo); $this->render = $form; $this->render = new Object($this->render, "<br/>"); } public function onChangeCombo($sender) { $dialog = new DialogBox("onChangeCombo", strip_tags($this->combo->getValue())); $this->addObject($dialog); } } ?>
Tutorial 8 : ComboBox with advance style
<?php class Combobox08 extends Page { public function InitializeComponent() { parent::$PAGE_TITLE = "Tutorial : ComboBox with advance style"; $this->render = new ComboBox($this); $this->render->setOption("mainCSS:'dd2'"); $this->render->setWidth(200); $this->render->addItem("value 1", "value 1", false, "img/home.png", "Group 1"); $this->render->addItem("value 2", "value 2", false, "img/doc.png", "Group 1"); $this->render->addItem("value 3", "value 3", false, "img/contact.png", "Group 2"); $this->render = new Object($this->render, "<br/><br/>"); } } ?>
|
|
|
|
|