本文整理汇总了PHP中Grid::onTap方法的典型用法代码示例。如果您正苦于以下问题:PHP Grid::onTap方法的具体用法?PHP Grid::onTap怎么用?PHP Grid::onTap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Grid
的用法示例。
在下文中一共展示了Grid::onTap方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SDPanel
* @author Kikapp
* @version 1.0
*/
$win = new SDPanel();
$win->setCaption("");
$table = new Table();
$table->setClass("tableGray");
$grid = new Grid();
$table_grid_product = new Table();
$table_grid_product->setClass("tableGrid");
$table_grid_product->setRowsStyle("80dip");
$table_grid_product->setColumnsStyle("35%;65%;15dip");
$table_grid_product->setHeight("85dip");
$grid->addData(grid_load_products());
//the main use of the grid is to load data from a server
$grid->onTap(action_prod());
//what happens when you tap on it
//inputs and controls
$title_prod = new InputText(150);
$title_prod->setClass("attributetitleList");
$title_prod->setAutoGrow(true);
$image_prod = new InputImage();
$image_prod->setClass("imageImageList2");
$desc_prod = new InputText(300);
$desc_prod->setClass("attributeTextGray");
$price_prod = new InputText(10);
$price_prod->setClass("attributeTextPrice");
$table_desc_prod = new Table();
$table_desc_prod->setRowsStyle("25dip;35dip;25dip");
$table_desc_prod->setClass("tableProduct");
$table_desc_prod->addControl($title_prod, 1, 1);
示例2: load_companies
$table_list->setColumnsStyle("86dip;100%");
//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'];
示例3: Table
$btn_img->setImage("img/ic_view_stream_white.png");
$btn_img->onTap(changeView());
$acb->addControl($btn_img);
$win->addControl($acb);
//Add action bar in panel.
$table = new Table();
$table->setClass("tableGray");
$grid = new Grid();
$table_grid = new Table();
$table_grid->setClass("tableGrid");
$table_grid->setRowsStyle("80dip");
$table_grid->setColumnsStyle("35%;65%;15dip");
$table_grid->setHeight("85dip");
$grid->addSearch($title);
$grid->addData(grid_load());
$grid->onTap(action());
$grid->setEmptyGridText("No items available");
//inputs and controls
$title = new InputText(150);
$title->setClass("input.titleList");
$title->setAutoGrow(true);
$image = new InputImage();
$image->setClass("image.roundedListImage");
$desc = new InputText(300);
$desc->setClass("input.textDescription");
$price = new InputText(10);
$price->setClass("input.priceList");
$table_desc = new Table();
$table_desc->setRowsStyle("25dip;35dip;25dip");
$table_desc->setClass("tableProduct");
$table_desc->addControl($title, 1, 1);