当前位置: 首页>>代码示例>>PHP>>正文


PHP Table::addControl方法代码示例

本文整理汇总了PHP中Table::addControl方法的典型用法代码示例。如果您正苦于以下问题:PHP Table::addControl方法的具体用法?PHP Table::addControl怎么用?PHP Table::addControl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Table的用法示例。


在下文中一共展示了Table::addControl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: start

$acb = new ActionBar();
$btn_update = new ButtonBar();
$btn_update->setCaption("Save");
$btn_update->onTap(save());
$btn_cancel = new ButtonBar();
$btn_cancel->setCaption("Cancel");
$btn_cancel->onTap(cancel());
$acb->addControl($btn_update);
$acb->addControl($btn_cancel);
$win->addControl($acb);
$mainTable = new Table();
$image = new InputImage();
$name = new InputText();
$address = new InputAddress();
$phone = new InputPhone();
$mainTable->addControl($name, 1, 1);
$mainTable->addControl($address, 2, 1);
$mainTable->addControl($phone, 3, 1);
$mainTable->addControl($image, 4, 1);
$win->addControl($mainTable);
function start()
{
    $url = "http://demo.kikapptools.com/CRMManager/crud/getCompanies.php?companyId=" . $id;
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array("CompanyName" => DataType::Character(100), "CompanyImage" => DataType::Character(200), "CompanyPhone" => DataType::Phone(), "CompanyAddress" => DataType::Address());
    Data::FromJson($struct, $result);
    $image = $struct['CompanyImage'];
    $name = $struct['CompanyName'];
    $address = $struct['CompanyAddress'];
    $phone = $struct['CompanyPhone'];
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:31,代码来源:update_company.php

示例2: facebook

<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("First Facebook Post!");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$mainTable = new Table();
$input = new InputText();
//create input
$input->setLabelCaption("Write your thoughts");
$button = new Button();
$button->setCaption("Post on Facebook");
$button->onTap(facebook());
$button->setClass("button.blue");
$mainTable->addControl($input, 1, 1, 1, 1, "Center", "Middle");
$mainTable->addControl($button, 2, 1, 1, 1, "Center", "Middle");
$win->addControl($mainTable);
function facebook()
{
    Facebook::PostToWall("First post", "Caption", $input, "http://www.kikapptools.com", "");
}
开发者ID:KikAppTools,项目名称:KikAppExamples,代码行数:26,代码来源:FB.php

示例3: budget

$maintable->setWidth("100%");
$maintable->setHeight("100%");
$maintable->setClass("table.white");
$label_budget = new Label();
$label_budget->setCaption("Add Budget");
$label_budget->setClass("label.blue");
$label_budget->onTap(budget());
$label_income = new Label();
$label_income->setCaption("Income");
$label_income->setClass("label.green");
$label_income->onTap(income());
$label_outcome = new Label();
$label_outcome->setCaption("Outcome");
$label_outcome->setClass("label.red");
$label_outcome->onTap(outcome());
$maintable->addControl($label_budget, 1, 1, 1, 1, "Center", "Middle");
$maintable->addControl($label_income, 2, 1, 1, 1, "Center", "Middle");
$maintable->addControl($label_outcome, 3, 1, 1, 1, "Center", "Middle");
$win->addControl($maintable);
function budget()
{
    $win->Open("Budget");
}
function income()
{
    $moveType = new InputText();
    $moveType->setValue("0");
    $win->Open("IncomeOutcome", $moveType);
}
function outcome()
{
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:31,代码来源:Movements.php

示例4: Slide

$table_twitter->onTap(twitte());
$table_twitter->addControl($img_twitter, 1, 1, 1, 1, "Center", "Middle");
$table_twitter->addControl($lbl_twitter, 1, 2, 1, 1, "Left", "Middle");
$table_map = new Table();
$table_map->setClass("table.MenuOption");
$table_map->setColumnsStyle("20%;80%");
$img_map = new Image();
$img_map->setImage("img/Android/hdpi/ic_map.png");
$img_map->setClass("image.menu");
$lbl_map = new Label();
$lbl_map->setClass("label.MenuOption");
$lbl_map->setCaption("Map");
$table_map->onTap(map());
$table_map->addControl($img_map, 1, 1, 1, 1, "Center", "Middle");
$table_map->addControl($lbl_map, 1, 2, 1, 1, "Left", "Middle");
$mainTable->addControl($table_home, 2, 1);
$mainTable->addControl($table_facebook, 3, 1);
$mainTable->addControl($table_twitter, 4, 1);
$mainTable->addControl($table_map, 5, 1);
$win->addControl($mainTable);
function Slide()
{
    $token = new InputText(80);
    $win->Open("Home");
}
function home()
{
    $win->Open("Home");
}
function facebook()
{
开发者ID:KikAppTools,项目名称:KikAppExamples,代码行数:31,代码来源:main.php

示例5: clickme

<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Hello world!");
$mainTable = new Table();
$input = new InputText();
$input->setLabelCaption("Write your name");
$button = new Button();
$button->setCaption("Click me!");
$button->onTap(clickme());
$mainTable->addControl($input, 1, 1);
$mainTable->addControl($button, 2, 1);
$win->addControl($mainTable);
function clickme()
{
    StorageAPI::Set("token", $input);
    $name = new InputText();
    $name = StorageAPI::Get("token");
    echo "Your name is: " . $name;
}
开发者ID:KikAppTools,项目名称:KikAppExamples,代码行数:25,代码来源:main.php

示例6: ClientStart

$table_login->addControl($img_login, 1, 1, 1, 1, "Center", "Middle");
$table_login->addControl($lbl_login, 1, 2, 1, 1, "Left", "Middle");
$table_logout = new Table();
$table_logout->setClass("tableMenuOption");
$table_logout->setColumnsStyle("20%;80%");
$img_logout = new Image();
$img_logout->setImage("img/Android/hdpi/ic_logout.png");
$img_logout->setClass("imagemenu");
$lbl_logout = new Label();
$lbl_logout->setCaption("Logout");
$lbl_logout->setClass("labelMenuOption");
$table_logout->onTap(logout());
$table_logout->addControl($img_logout, 1, 1, 1, 1, "Center", "Middle");
$table_logout->addControl($lbl_logout, 1, 2, 1, 1, "Left", "Middle");
$table_space = new Table();
$table->addControl($table_space, 1, 1);
$table->addControl($table_home, 2, 1);
$table->addControl($table_account, 3, 1);
$table->addControl($table_transactions, 4, 1);
$table->addControl($table_login, 5, 1);
$table->addControl($table_settings, 6, 1);
$table->addControl($table_logout, 7, 1);
$token = new InputText(80);
$win->addControl($table);
function ClientStart()
{
    $token = StorageAPI::Get("token");
    if ($token == "") {
        $table_account->setVisible(false);
        $table_transactions->setVisible(false);
        $table_settings->setVisible(false);
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:31,代码来源:Slide.php

示例7: refresh

$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);
$table_button->setHeight("10%");
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1, 1, 1, "Center", "Bottom");
$win->addControl($table);
$win->Render();
function refresh()
{
    echo $name;
}
function start()
{
    echo $id;
}
function save()
{
    ProgressIndicator::Show();
    $request = new httpClient();
开发者ID:pablanco,项目名称:taskManager,代码行数:31,代码来源:TaskDetail.php

示例8: Slide

$table_add->addControl($lbl_add, 1, 2, 1, 1, "Left", "Middle");
//Deleted button
$table_deleted = new Table();
$table_deleted->setClass("table.MenuItem");
$table_deleted->setColumnsStyle("20%;80%");
$img_deleted = new Image();
$img_deleted->setImage("img/ic_deleted.png");
$img_deleted->setClass("image.MenuItem");
$lbl_deleted = new Label();
$lbl_deleted->setCaption("Done");
$lbl_deleted->setClass("label.MenuItem");
$table_deleted->onTap(openDoneList());
$table_deleted->addControl($img_deleted, 1, 1, 1, 1, "Center", "Middle");
$table_deleted->addControl($lbl_deleted, 1, 2, 1, 1, "Left", "Middle");
//Add controls to menu
$table->addControl($table_header, 1, 1);
$table->addControl($table_home, 2, 1);
$table->addControl($table_deleted, 3, 1);
$table->addControl($table_add, 4, 1);
//Add controls to main screen
$win->addControl($table);
$win->Render();
function Slide()
{
    $period = new InputNumeric();
    $period->setValue(0);
    $statusList = new InputNumeric();
    $statusList->setValue(0);
    $win->Open("TodoLits", $period, $statusList);
}
function openTodoLits()
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:31,代码来源:MyTaskList.php

示例9: clickme

<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Combo Box!");
$mainTable = new Table();
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$button = new Button();
$button->setCaption("Click me!");
$button->onTap(clickme());
$combo_box = new ComboBox();
$combo_box->setEmptyItem(true);
$combo_box->setEmptyItemText("Choose options");
$combo_box->setValues("Option 1:1, Option 2:2, Option 3:3");
$mainTable->addControl($combo_box, 1, 1);
$mainTable->addControl($button, 5, 1);
$win->addControl($mainTable);
function clickme()
{
    echo "You have selected option number " . $combo_box->getValue();
}
开发者ID:KikAppTools,项目名称:KikAppExamples,代码行数:26,代码来源:main.php

示例10: SDPanel

<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("First Label");
$mainTable = new Table();
$label = new Label();
$label->setCaption("My first label!");
$mainTable->addControl($label, 1, 1);
$win->addControl($mainTable);
开发者ID:KikAppTools,项目名称:KikAppExamples,代码行数:14,代码来源:main.php

示例11: clickme

 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("Radio Button!");
$mainTable = new Table();
$mainTable->setRowsStyle("200dip;pd;pd;pd;66dip");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$radio_button = new RadioButton();
$radio_button->setValues("Uruguay:1,US:2,Canada:3");
$radio_button->setAddEmptyItem(false);
$radio_button->setTitle("Where are you from?");
$button = new Button();
$button->setCaption("Click me!");
$button->onTap(clickme());
$mainTable->addControl($radio_button, 1, 1);
$mainTable->addControl($button, 5, 1);
$win->addControl($mainTable);
function clickme()
{
    if ($radio_button->getValue() == "1") {
        echo "You are from Uruguay!";
    }
    if ($radio_button->getValue() == "2") {
        echo "You are from US!";
    }
    if ($radio_button->getValue() == "3") {
        echo "You are from Canada!";
    }
}
开发者ID:KikAppTools,项目名称:KikAppExamples,代码行数:31,代码来源:main.php

示例12: load_images

$win = new SDPanel();
$win->setCaption("Image Gallery");
$mainTable = new Table();
//Create Inputs
$id = new InputNumeric();
$title = new InputText();
$desc = new InputText();
$image = new InputImage();
//Create Image Gallery
$grid = new ImageGallery();
$grid->setImage($image);
$grid->setTitle($title);
$grid->setSubtitle($desc);
$grid->setEnableShare(true);
$grid->addData(load_images());
$mainTable->addControl($grid, 1, 1);
$win->addControl($mainTable);
function load_images()
{
    $url = "http://demo.kikapptools.com/magento/apiGecko/productos.php?cId=0";
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array(array("id" => DataType::Numeric(6), "name" => DataType::Character(150), "description" => DataType::Character(300), "pirce" => DataType::Character(10), "thumb" => DataType::Character(200)));
    Data::FromJson($struct, $result);
    foreach ($struct as $product) {
        $id = $product['id'];
        $title = $product['name'];
        $desc = $product['description'];
        $image = $product['thumb'];
    }
}
开发者ID:KikAppTools,项目名称:KikAppExamples,代码行数:31,代码来源:main.php

示例13: load_grid

$name->setClass("input.Title");
$date = new InputDate();
$date->setClass("input.Common");
$statusIcon = new Image();
$statusIcon->setImage("img/tick.png");
$statusIcon->setClass("image.ListIcon");
$statusIcon->onTap(changeToDone());
$table_list = new Table();
$table_list->addControl($name, 1, 1, 1, 6, "Left", "Middle");
$table_list->addControl($date, 1, 2, 1, 2, "Left", "Middle");
$table_list->addControl($statusIcon, 1, 3, 1, 1, "Middle", "Middle");
$table_grid->addControl($table_list, 1, 1);
$table_grid->onTap(detail());
//Add controls to main screen
$list->addControl($table_grid);
$table->addControl($list);
$win->addControl($table);
$win->Render();
function load_grid()
{
    //Make JSON request
    $url = "http://demo.kikapptools.com/taskManager/crud/getTask.php?status=" . $statusList . "&period=" . $period;
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    //Cast response data type
    $struct = array(array("id" => DataType::Numeric(6), "task" => DataType::Character(150), "status" => DataType::Numeric(1), "created_at" => DataType::Character(20)));
    Data::FromJson($struct, $result);
    //Add result to screen vars
    foreach ($struct as $items) {
        $id = $items['id'];
        $name = $items['task'];
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:31,代码来源:TodoLits.php

示例14: login

$pass->setInviteMessage("Password");
$pass->setIsPassword(true);
$btn_save = new Button();
$btn_save->setCaption("LOG IN");
$btn_save->setClass("buttonform");
$btn_save->onTap(login());
$lbl_signup = new Label();
$lbl_signup->setClass("label.SubTitlelogin");
$lbl_signup->setCaption("Not a store member?");
$btn_register = new Button();
$btn_register->setCaption("SIGN UP NOW");
$btn_register->setClass("button.Small");
$btn_register->onTap(register());
$table_form->addControl($email, 1, 1);
$table_form->addControl($pass, 2, 1);
$table->addControl($lbl_home, 1, 1, 1, 1, "Center", "Middle");
$table->addControl($table_form, 2, 1);
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table_button->addControl($lbl_signup, 2, 1, 1, 1, "Center", "Middle");
$table_button->addControl($btn_register, 3, 1);
$table->addControl($table_button, 3, 1);
$win->addControl($table);
$win->Render();
function login()
{
    if ($email == null) {
        echo "E-Mail is a required field.";
    } else {
        if ($pass == null) {
            echo "Password is a required field.";
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:31,代码来源:Login.php

示例15: start

 * Example SDMap.
 * @author KikApp
 * @version 1.0
 */
$win = new SDPanel();
//Create Inputs
$id = new InputNumeric();
$title = new InputText();
$desc = new InputText();
Data::getParm($id, $title);
//get parms.
$mainTable = new Table();
$table = new Table();
$table->addControl($title, 1, 1);
$table->addControl($desc, 2, 1);
$mainTable->addControl($table, 1, 1);
$win->addControl($mainTable);
function start()
{
    /*
    $url = "http://demo.kikapptools.com/SDMap/crud/getPlaces.php?id=".$id;
    $httpClient = new httpClient();
    
    $result = $httpClient -> Execute('GET',$url);
    
    $struct = array(
    		array(
    				"Id" => DataType::Numeric(6),
    				"Title" => DataType::Character(150),
    				"Description" => DataType::Character(300),
    				"Geolocation" => DataType::Geolocation()
开发者ID:KikAppTools,项目名称:KikAppExamples,代码行数:31,代码来源:detail.php


注:本文中的Table::addControl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。