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


PHP Canvas::addPosition方法代码示例

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


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

示例1: refresh

$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);
$canvas->addPosition($img_add, "100%", "60dip", "97%", "60dip", "15dip", "3%", 5);
$table_canvas->addControl($canvas, 1, 1);
$maintable->addControl($table_canvas, 1, 1);
$win->addControl($maintable);
function refresh()
{
    $url = "http://demo.kikapptools.com/Gastos/crud/getIncome.php?id=" . $token;
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array("account" => DataType::Numeric(11), "value_income" => DataType::Numeric(11), "value_outcome" => DataType::Numeric(11), "value_income_month" => DataType::Numeric(11), "value_outcome_month" => DataType::Numeric(11), "label_actual_month" => DataType::Character(20));
    Data::FromJson($struct, $result);
    $input_account = $struct['account'];
    $input_income = $struct['value_income'];
    $input_outcome = $struct['value_outcome'];
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:31,代码来源:Home.php

示例2: load_companies

//Controls in grid.
$image = new InputImage();
$image->setClass("image.List");
$name = new InputText();
$name->setClass("input.title");
$address = new InputText();
$table_info = new Table();
$table_info->addControl($name, 1, 1, 1, 1, "Left", "Bottom");
$table_info->addControl($address, 2, 1);
$table_list->addControl($image, 1, 1);
$table_list->addControl($table_info, 1, 2);
$list->addData(load_companies());
$list->addSearch($name);
$list->addControl($table_list, 1, 1);
$list->onTap(action());
$canvas->addPosition($list, "0", "100%", "0", "100%", "0", "0", 0);
$canvas->addPosition($img_add, "100%", "60dip", "97%", "60dip", "15dip", "3%", 1);
$mainTable->addControl($canvas, 1, 1);
$win->addControl($mainTable);
function load_companies()
{
    $url = "http://demo.kikapptools.com/CRMManager/crud/getCompanies.php";
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    $struct = array(array("CompanyId" => DataType::Numeric(8), "CompanyName" => DataType::Character(100), "CompanyImage" => DataType::Character(200), "CompanyAddress" => DataType::Character(200)));
    Data::FromJson($struct, $result);
    $id = new InputNumeric();
    foreach ($struct as $company) {
        $id = $company['CompanyId'];
        $image = $company['CompanyImage'];
        $name = $company['CompanyName'];
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:31,代码来源:list_companies.php

示例3: grid_load

$title = new InputText(150);
$title->setClass("inputtextTitlewhite");
$title->setAutoGrow(true);
$image = new InputImage();
$image->setClass("imageImageList");
$desc = new InputText(300);
$desc->setClass("inputtextwhite");
$price = new InputText(10);
$price->setClass("inputtextPrice");
$table_desc = new Table();
$table_desc->setRowsStyle("25dip;35dip;25dip");
$table_desc->setClass("tableProductThumb");
$table_desc->addControl($title, 1, 1);
$table_desc->addControl($desc, 2, 1);
$table_desc->addControl($price, 3, 1);
$table_grid->addPosition($image, "0%", "100%", "0", "230dip", "0%", "100%");
$table_grid->addPosition($table_desc, "0%", "100%", "140dip", "83dip", "0", "0");
$grid_home->addControl($table_grid);
$mainTable->setRowsStyle("230dip;100%");
$mainTable->addControl($grid_home, 1, 1);
$win->addControl($mainTable);
function grid_load()
{
    $url = "http://www.demo.kikapptools.com/magento/apiGecko/productos.php?display=home";
    $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'];
开发者ID:KikAppTools,项目名称:KikAppExamples,代码行数:31,代码来源:main.php

示例4: SDPanel

<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("First Canvas!");
$canvas = new Canvas();
$canvas->setWidth("100%");
$canvas->setHeight("100%");
$mainTable = new Table();
$table = new Table();
$label = new Label();
$label->setCaption("First image:");
$label2 = new Label();
$label2->setCaption("Second image:");
$image = new Image();
$image->setImage("img/Android/hdpi/appicon.png");
$image2 = new Image();
$image2->setImage("img/Android/hdpi/lunchimage.png");
$table->addControl($label, 1, 1);
$table->addControl($label2, 3, 1);
$canvas->addPosition($image2, "0%", "100%", "0", "350dip", "0%", "100%", 0);
$canvas->addPosition($image, "0%", "100%", "0", "66dip", "0%", "100%", 1);
$canvas->addPosition($table, "0%", "100%", "0", "180dip", "0%", "100%", 2);
$mainTable->addControl($canvas, 1, 1);
$win->addControl($mainTable);
开发者ID:KikAppTools,项目名称:KikAppExamples,代码行数:29,代码来源:main.php

示例5: lista

$title = new InputText(150);
$title->setClass("inputtextTitlewhite");
$title->setAutoGrow(true);
$image = new InputImage();
$image->setClass("imageImageList");
$desc = new InputText(300);
$desc->setClass("inputtextwhite");
$price = new InputText(10);
$price->setClass("inputtextPrice");
$table_desc = new Table();
$table_desc->setRowsStyle("25dip;35dip;25dip");
$table_desc->setClass("tableProductThumb");
$table_desc->addControl($title, 1, 1);
$table_desc->addControl($desc, 2, 1);
$table_desc->addControl($price, 3, 1);
$table_grid->addPosition($image, "0%", "100%", "0", "185dip", "0%", "100%");
$table_grid->addPosition($table_desc, "0%", "100%", "95dip", "70dip", "0", "0");
$grid->addControl($table_grid);
$table->addControl($grid);
$win->addControl($table);
$win->Render();
function lista()
{
    $win->Open("ProductList", $cat);
}
//Grid load function
function grid_load()
{
    $url = "http://demo.kikapptools.com/magento/apiKikApp/Products.php?cId=" . $cat;
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
开发者ID:KikAppTools,项目名称:KikAppDemos,代码行数:31,代码来源:ProductThumbList.php

示例6: load_grid

$statusLabel->setCaption("Done");
$statusLabel->setClass("inputcommon");
$statusLabel->onTap(changeStatus());
/*
$statusButton = new ButtonBar();
$statusButton -> setCaption("change");
//$statusButton -> setImage("img/ico_thumb.png");
$statusButton -> setClass("buttonform");
$statusButton -> onTap(changeViewType());
*/
$table_list = new Table();
$table_list->addControl($name, 1, 1, 1, 4, "Left", "Middle");
$table_list->addControl($statusLabel, 1, 2, 1, 1, "Right", "Middle");
//$table_list -> addControl($status,1,3,1,1,"Right","Middle");
//$table_list -> addControl($statusButton,1,4,1,1,"Right","Middle");
$table_grid->addPosition($table_list, "0%", "100%", "0", "50dip", "0%", "100%");
$table_grid->onTap(detail());
$table_grid->onLongTap(delete());
$list->addControl($table_grid);
$table->addControl($list);
$win->addControl($table);
$win->Render();
function load_grid()
{
    //Make JSON request
    $url = "http://52.34.247.215/frameWorkExamples/taskManager/crud/getTask.php";
    $httpClient = new httpClient();
    $result = $httpClient->Execute('GET', $url);
    //Cast response data type
    $struct = array(array("ID" => type::Numeric(6), "TASK" => type::Character(150), "STATUS" => type::Numeric(1)));
    Data::FromJson($struct, $result);
开发者ID:pablanco,项目名称:taskManager,代码行数:31,代码来源:mainThumb.php


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