$mainTable->setWidth("100%"); $mainTable->setHeight("100%"); $mainTable->setClass("table.white"); $table = new Table(); $table->setRowsStyle("76dip;76dip;76dip;76dip;76dip"); $table->setClass("table.forms"); $move_type = new InputText(); $move_type->setClass("input.form"); $move_type->setReadOnly(true); $value = new InputNumeric(10); $value->setClass("input.form"); $date = new InputDate(); $date->setClass("input.form"); $description = new InputText(); $description->setClass("input.form"); $dc_cat = new DynamicComboBox(); $dc_cat->setValues(load_cat()); $dc_cat->setAddEmptyItem(false); $dc_cat->setClass("input.form"); $label_type = new Label(); $label_type->setCaption("Move type:"); $label_type->setClass("label.black"); $label_value = new Label(); $label_value->setCaption("Value:"); $label_value->setClass("label.black"); $label_date = new Label(); $label_date->setCaption("Date:"); $label_date->setClass("label.black"); $label_description = new Label(); $label_description->setCaption("Description:"); $label_description->setClass("label.black");
$table = new Table(); $table->setRowsStyle("100%"); $table->setWidth("100%"); $table->setHeight("100%"); $table->setClass("table.white"); $table_form = new Table(); $table_form->setRowsStyle("76dip;76dip;76dip;76dip"); $table_form->setClass("table.forms"); $input_value = new InputNumeric(15); $input_value->setClass("input.form"); $input_date = new InputDate(); $input_date->setClass("input.form"); $input_desc = new InputText(); $input_desc->setLabelCaption("Description"); $input_desc->setClass("input.form"); $dc_cat = new DynamicComboBox(); $dc_cat->setValues(load_cat()); $dc_cat->setAddEmptyItem(false); $dc_cat->setClass("input.form"); $button = new Button(); $button->setCaption("Confirm"); $button->onTap(confirm()); $button->setClass("button.blue"); $table_form->addControl($input_value, 1, 1, 1, 1, "Center", "Middle"); $table_form->addControl($input_date, 2, 1, 1, 1, "Center", "Middle"); $table_form->addControl($input_desc, 3, 1, 1, 1, "Center", "Middle"); $table_form->addControl($dc_cat, 4, 1, 1, 1, "Center", "Middle"); $table_button = new Table(); $table_button->addControl($button, 1, 1, 1, 1, "Center", "Middle"); $table->addControl($table_form, 1, 1); $table->addControl($table_button, 2, 1);
<?php /** * Main object. * @author Kikapp * @version 1.0 */ $win = new SDPanel(); $win->setCaption("Dynamic Combo Box!"); $actionBar = new ActionBar(); $actionBar->setClass("applicationBars"); $mainTable = new Table(); $button = new Button(); $button->setCaption("Click me!"); $button->onTap(clickme()); $dc = new DynamicComboBox(); $dc->setValues(load_data()); $dc->setAddEmptyItem(false); $mainTable->addControl($button, 1, 1); $mainTable->addControl($dc, 2, 1); $win->addControl($mainTable); function clickme() { echo "Hello !"; } function load_data() { $url = "http://www.devxtend.com/Gecko/samples/3_2/rest/main_load_data"; $hc = new httpClient(); $rs = $hc->Execute("GET", $url); $struct = array(array("id" => DataType::Character(6), "name" => DataType::Character(100)));