Beispiel #1
0
$input1->setReadOnly(true);
$input1->setClass("label.black");
$label_green_bis = new Label();
$label_green_bis->setClass("label.income");
$label_red_bis = new Label();
$label_red_bis->setClass("label.outcome");
$table_income_month = new Table();
$table_income_month->setColumnsStyle("5dip;50%;50%");
$table_income_month->addControl($label_green_bis, 1, 1, 1, 1, "", "Middle");
$table_income_month->addControl($label_income_month, 1, 2, 1, 1, "Center", "Middle");
$table_income_month->addControl($input1, 1, 3, 1, 1, "Right", "Middle");
$label_outcome_month = new Label();
$label_outcome_month->setCaption("Outcome: ");
$label_outcome_month->setClass("label.black");
$input2 = new InputText();
$input2->setReadOnly(true);
$input2->setClass("label.black");
$table_outcome_month = new Table();
$table_outcome_month->setColumnsStyle("5dip;50%;50%");
$table_outcome_month->addControl($label_red_bis, 1, 1, 1, 1, "", "Middle");
$table_outcome_month->addControl($label_outcome_month, 1, 2, 1, 1, "Center", "Middle");
$table_outcome_month->addControl($input2, 1, 3, 1, 1, "Right", "Middle");
$table_first->addControl($table_account, 1, 1);
$table_first->addControl($table_income, 2, 1);
$table_first->addControl($table_outcome, 3, 1);
$table_second->addControl($table_title_month, 1, 1);
$table_second->addControl($table_income_month, 2, 1);
$table_second->addControl($table_outcome_month, 3, 1);
//addPosition(control, left, width, top, height, right, bottom, zorder)
$canvas->addPosition($table_first, "10dip", "100%", "15dip", "60dip", "10dip", "0%", 1);
$canvas->addPosition($table_second, "10dip", "100%", "225dip", "60dip", "10dip", "0%", 1);
$btn_delete->onTap(delete());
$acb->addControl($btn_update);
$acb->addControl($btn_delete);
$win->addControl($acb);
$mainTable = new Table();
$mainTable->setEnableHeaderRowPattern(true);
$mainTable->setHeaderRowApplicationBarsClass("applicationBars.transparent");
$mainTable->setRowsStyle("150dip;pd");
$tableImg = new Table();
$tableImg->setClass("table.image");
$tableImg->setRowsStyle("pd;150dip;pd");
$image = new InputImage();
$image->setReadOnly(true);
$image->setClass("image.roundBorder");
$name = new InputText();
$name->setReadOnly(true);
$name->setClass("input.title");
$address = new InputAddress();
$address->setReadOnly(true);
$phone = new InputPhone();
$phone->setReadOnly(true);
$tableImg->addControl($image, 2, 1, 1, 1, "Center", "Middle");
$tableImg->addControl($name, 3, 1, 1, 1, "Center", "Middle");
$tableDesc = new Table();
$tableDesc->setClass("table.margin");
$tableDesc->addControl($address, 1, 1);
$tableDesc->addControl($phone, 2, 1);
$mainTable->addControl($tableImg, 1, 1);
$mainTable->addControl($tableDesc, 2, 1);
$win->addControl($mainTable);
function start()
$acg1->addControl($btn_facebook);
$acg1->addControl($btn_tw);
$acg1->addControl($btn_sms);
$acg1->addControl($btn_email);
$apb1->addControl($acg1);
//Add action bar to a SDPanel.
$win->addControl($apb1);
$tableItemDetail = new Table();
$tableItemDetail->setClass("table.TableDetailMain");
$title = new InputText(150);
$title->setClass("inputtitleblack");
$title->setAutoGrow(true);
$title->setReadOnly(true);
$desc = new InputText(300);
$desc->setClass("attributeTextGray");
$desc->setReadOnly(true);
$desc->setAutoGrow(true);
$price = new InputText(10);
$price->setClass("inputTextPrice");
$price->setReadOnly(true);
$stock = new InputText();
$stock->setClass("input.textStock");
$stock->setReadOnly(true);
$grid = new HorizontalGrid();
$grid->setRowsPerPagePortrait(1);
$grid->setShowPageController(true);
//$grid -> setPageControllerBackColor("#FFFFFF");
$grid->addData(load_image());
//$grid -> onTap(view_image());
$grid->setPageControllerClass("table.grid");
$table_grid = new Table();
$btn_cancel->setCaption("Delete");
$btn_cancel->onTap(delete());
$acb->addControl($btn_update);
$acb->addControl($btn_cancel);
$win->addControl($acb);
$mainTable = new Table();
$mainTable->setRowsStyle("100%");
$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:");
$table_list->onLongTap(removeProduct());
//$table_list->onTap(view_image());
$list->addControl($table_list, 1, 1);
$table_result = new Table();
$table_result->setClass("table.checkout");
$table_result->setRowsStyle("90dip;70dip");
$lbl_total = new Label();
$lbl_total->setCaption("Total: ");
$lbl_sub_total = new Label();
$lbl_sub_total->setCaption("Sub total: ");
$lbl_shipping = new Label();
$lbl_shipping->setCaption("Shipping: ");
$lbl_tax = new Label();
$lbl_tax->setCaption("Tax: ");
$total = new InputText(10);
$total->setReadOnly(true);
$total->setClass("input.textPriceTotal");
//$total -> setLabelPosition("Left");
//$total -> setLabelCaption("$");
$subtotal = new InputText(10);
$subtotal->setReadOnly(true);
$subtotal->setClass("input.textPrice");
$shipping = new InputText(10);
$shipping->setReadOnly(true);
$shipping->setClass("input.textPrice");
$tax = new InputText(10);
$tax->setReadOnly(true);
$tax->setClass("input.textPrice");
$btn_checkout = new Button();
$btn_checkout->setClass("buttonred");
$btn_checkout->setCaption("CHECKOUT NOW");
Beispiel #6
0
$win = new SDPanel();
$win->setCaption(" ");
$table = new Table();
$table->setClass("table.Menu");
$table->setRowsStyle("150dip;50dip");
//Menu Header
$table_header = new Table();
$table_header->setClass("table.Header");
$table_header->setColumnsStyle("15%;85%");
$table_header->setRowsStyle("50dip;90dip");
$headerImage = new Image();
$headerImage->setClass("image.MenuHeader");
$headerImage->setImage("img/userIcon.png");
$headerLabel = new InputText();
$headerLabel->setClass("input.titleWhite");
$headerLabel->setReadOnly(true);
$table_header->addControl($headerImage, 2, 1, 1, 1, "Left", "Middle");
$table_header->addControl($headerLabel, 2, 2, 1, 1, "Left", "Middle");
$table_home = new Table();
$table_home->setClass("tableMenuOption");
$table_home->setColumnsStyle("20%;80%");
$img_home = new Image();
$img_home->setImage("img/ic_home.png");
$img_home->setClass("imagemenu");
$lbl_home = new Label();
$lbl_home->setClass("labelMenuOption");
$lbl_home->setCaption("Home");
$table_home->onTap(home());
$table_home->addControl($img_home, 1, 1, 1, 1, "Center", "Middle");
$table_home->addControl($lbl_home, 1, 2, 1, 1, "Left", "Middle");
$table_products = new Table();
Beispiel #7
0
<?php

$win = new SDPanel();
$win->setCaption("httpClient Example");
$table = new Table();
$city = new InputText();
$city->setReadOnly(true);
$button = new Button();
$button->setCaption("Load City");
$button->onTap(loadCity());
$table->addControl($city, 1, 1);
$table->addControl($button, 2, 1);
$win->addControl($table);
function loadCity()
{
    $url = "http://demo.kikapptools.com/HttpClientEjemplo/crud/getCity.php";
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array("nombreCiudad" => DataType::Character(150));
    Data::FromJson($struct, $result);
    $city = $product['nombreCiudad'];
}