Exemplo n.º 1
0
<?php

/***
 * Detail of product
 */
$win = new SDPanel();
$win->setCaption("Task Detail");
$id = new InputNumeric();
$name = new InputText();
$status = new InputBoolean();
$status->setLabelCaption("Status");
$status->setLabelPosition("Left");
$imagen = new InputImage();
//$name -> setClass("inputForm");
Data::getParm($id, $name, $status);
$table = new Table();
$table->setClass("tablebackground");
$table_form = new Table();
$table_form->setClass("tableforms");
$table_form->setRowsStyle("76dip;76dip;76dip");
$table_form->setHeight("90%");
$btn_save = new Button();
$btn_save->setCaption("Save");
$btn_save->setClass("buttonform");
$btn_save->onTap(save());
$table_form->addControl($id, 1, 1);
$table_form->addControl($name, 2, 1);
$table_form->addControl($imagen, 3, 1);
$table_form->addControl($status, 4, 1);
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
Exemplo n.º 2
0
$btn_delete = new ButtonBar();
$btn_delete->setCaption("Delete");
$btn_delete->onTap(removeTask());
$btn_delete->setImage("img/deleteBar.png");
$bar->addControl($btn_delete);
$win->addControl($bar);
//Items definition
$name = new InputText();
$name->setClass("input.Common");
$description = new InputText();
$description->setClass("input.Common");
$date = new InputDate();
$date->setLabelCaption("Task date");
$date->setClass("input.Common");
$addToCalendar = new InputBoolean();
$addToCalendar->setLabelCaption("Add to my calendar");
$addToCalendar->setLabelPosition("Right");
//Main table definition
$table = new Table();
$table->setClass("table.Background");
$table_form = new Table();
$table_form->setClass("table.Form");
$table_form->setRowsStyle("65dip;65dip;120dip;55dip");
$table_form->setHeight("90%");
$table_form->addControl($name, 1, 1, 1, 2);
$table_form->addControl($date, 2, 1, 1, 2);
$table_form->addControl($description, 3, 1, 1, 2, "Left", "Top");
$table_form->addControl($addToCalendar, 4, 1, 1, 1, "Left", "Top");
$btn_save = new Button();
$btn_save->setCaption("Save");
$btn_save->setClass("button.Form");