本文整理汇总了PHP中Button::setClass方法的典型用法代码示例。如果您正苦于以下问题:PHP Button::setClass方法的具体用法?PHP Button::setClass怎么用?PHP Button::setClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Button
的用法示例。
在下文中一共展示了Button::setClass方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: refresh
$token = new InputText(80);
Data::getParm($token);
$table = new Table();
$table->setClass("tablebackground");
$table_form = new Table();
$table_form->setClass("tableforms");
$table_form->setRowsStyle("76dip;76dip;76dip");
$name = new InputText();
$name->setClass("inputForm");
$last_name = new InputText();
$last_name->setClass("inputForm");
$email = new InputEmail();
$email->setClass("inputForm");
$btn_save = new Button();
$btn_save->setCaption("Save");
$btn_save->setClass("buttonform");
$btn_save->onTap(save());
$table_form->addControl($name, 1, 1);
$table_form->addControl($last_name, 2, 1);
$table_form->addControl($email, 3, 1);
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1);
$win->addControl($table);
$win->Render();
function refresh()
{
$ur = "http://www.demo.kikapptools.com/magento/apiKikApp/api.php?metodo=userData&customerToken=" . $token;
$http = new httpClient();
$result = $http->Execute('GET', $ur);
示例2: save
$email->setInviteMessage("E-Mail");
$email->setClass("input.form");
$password = new InputText();
$password->setClass("input.form");
$password->setInviteMessage("Password");
$password->setIsPassword(true);
$password_2 = new InputText();
$password_2->setClass("input.form");
$password_2->setInviteMessage("Confirm your Password");
$password_2->setIsPassword(true);
$table_form->addControl($email, 1, 1);
$table_form->addControl($password, 2, 1);
$table_form->addControl($password_2, 3, 1);
$btn_save = new Button();
$btn_save->setCaption("SIGN UP");
$btn_save->setClass("button.blue");
$btn_save->onTap(save());
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1);
$win->addControl($table);
function save()
{
if ($email == null) {
echo "EMail is a required field.";
} else {
if ($password == null) {
echo "Password is a required field.";
} else {
if ($password != $password_2) {
示例3: 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", "");
}
示例4: login
$username->setInviteMessage("E-Mail");
$password = new InputText();
$password->setClass("input.form");
$password->setInviteMessage("Password");
$password->setIsPassword(true);
$label = new Label();
$label->setCaption("OR");
$label->setClass("label.big");
$btn_save = new Button();
$btn_save->setCaption("Log in");
$btn_save->onTap(login());
$btn_save->setClass("button.blue");
$btn_register = new Button();
$btn_register->setCaption("Sign up");
$btn_register->onTap(register());
$btn_register->setClass("button.blue");
$table_form->addControl($username, 1, 1);
$table_form->addControl($password, 2, 1);
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table_button->addControl($label, 2, 1, 1, 1, "Center", "Middle");
$table_button->addControl($btn_register, 3, 1);
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1);
$win->addControl($table);
function login()
{
if ($username == null) {
echo "E-Mail is a required field.";
} else {
if ($password == null) {
示例5: load_image
$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();
$table_grid->setRowsStyle("100%");
$table_grid->setHeight("100%");
$table_grid->setClass("table.grid");
$image = new InputImage();
$image->setClass("imageImageList");
$table_grid->addControl($image, 1, 1);
$grid->addControl($table_grid, 1, 1);
$btnAdd = new Button();
$btnAdd->setClass("buttonred");
$btnAdd->setCaption("Add to Cart");
$btnAdd->onTap(add_cart());
$tableButtons = new Table();
$tableButtons->addControl($btnAdd, 1, 1);
$tableItemDetail->addControl($title, 1, 1, 1, 2, "Left", "Middle");
$tableItemDetail->addControl($price, 2, 1, 1, 1, "Left", "Middle");
$tableItemDetail->addControl($stock, 2, 2, 1, 1, "Center", "Middle");
$tableItemDetail->addControl($desc, 3, 1, 1, 2, "Left", "Middle");
$tableItemDetail->addControl($tableButtons, 4, 1, 1, 2, "Left", "Middle");
$table->addControl($grid, 1, 1);
$table->addControl($tableItemDetail, 2, 1);
$table->setRowsStyle("250dip;100%");
$win->addControl($table, 1, 1, 1, 2);
function load_image()
{
示例6: login
$email->setClass("inputForm");
$email->setInviteMessage("E-Mail");
$pass = new InputText();
$pass->setClass("inputForm");
$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) {
示例7: InputText
$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");
$btn_checkout->onTap(checkout());
$table_total = new Table();
$table_total->setColumnsStyle("70%;30%");
$table_total->setRowsStyle("25dip;25dip;25dip;40dip");
$table_total->addControl($lbl_sub_total, 1, 1, 1, 1, "Left", "Middle");
$table_total->addControl($subtotal, 1, 2, 1, 1, "Right", "Middle");
$table_total->addControl($lbl_tax, 2, 1, 1, 1, "Left", "Middle");
$table_total->addControl($tax, 2, 2, 1, 1, "Right", "Middle");
$table_total->addControl($lbl_shipping, 3, 1, 1, 1, "Left", "Middle");
$table_total->addControl($shipping, 3, 2, 1, 1, "Right", "Middle");
$table_total->addControl($lbl_total, 4, 1, 1, 1, "Left", "Middle");
$table_total->addControl($total, 4, 2, 1, 1, "Right", "Middle");
$table_result->addControl($table_total, 1, 1);
$table_result->addControl($btn_checkout, 2, 1, 1, 1, "Left", "Top");
示例8: action
<?php
/**
* Button control example.
* mainButton.php
*/
$win = new SDPanel();
$win->setCaption("Button control");
$tabMain = new Table();
$button = new Button();
$button->setCaption("Button");
$button->setClass("button.Example");
$button->onTap(action());
$tabMain->addControl($button, 1, 1);
$win->addControl($tabMain);
function action()
{
echo "Hello world!";
}