本文整理汇总了PHP中Button::setCaption方法的典型用法代码示例。如果您正苦于以下问题:PHP Button::setCaption方法的具体用法?PHP Button::setCaption怎么用?PHP Button::setCaption使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Button
的用法示例。
在下文中一共展示了Button::setCaption方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getField
/**
* TextField::getField()
*
* Return the HTML of the field
*
* @return string: the html
* @access public
* @author Johan Wiegel
*/
function getField()
{
// view mode enabled ?
if ($this->getViewMode()) {
// get the view value..
return $this->_getViewValue();
}
//$this->_form->_setJS( '<script>function SetUrl( sUrl ){document.getElementById(\'bestand\').value=sUrl}</script>', $isFile = false, $before = true);
$oButton = new Button($this->_form, 'Bladeren');
$oButton->setCaption('Bladeren');
$oButton->setExtra("onclick=\"window.open( '" . FH_FHTML_DIR . "filemanager/browser/default/browser.html?Type=File&naam=" . $this->_sName . "&Connector=../../connectors/php/connector.php?ServerPath=" . $this->_path . "','','modal=yes,width=650,height=400');\"");
$sButton = $oButton->getButton();
return sprintf('<input type="text" name="%s" id="%1$s" value="%s" size="%d" %s' . FH_XHTML_CLOSE . '>%s %s ', $this->_sName, isset($this->_mValue) ? htmlspecialchars($this->_mValue) : '', $this->_iSize, (isset($this->_iTabIndex) ? 'tabindex="' . $this->_iTabIndex . '" ' : '') . (isset($this->_sExtra) ? ' ' . $this->_sExtra . ' ' : ''), isset($this->_sExtraAfter) ? $this->_sExtraAfter : '', $sButton);
}
示例2: SDPanel
/**
* Main object.
* @author Kikapp
* @version 1.0
*/
$win = new SDPanel();
$win->setCaption("Address Book");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$mainTable = new Table();
$btn_contact_add = new Button();
$btn_contact_add->setCaption("Add Contact");
$btn_contact_add->onTap(addContact());
$btn_contact_viewAll = new Button();
$btn_contact_viewAll->setCaption("View All Contact");
$btn_contact_viewAll->onTap(viewAllContact());
$input_name = new InputText();
$input_name->setLabelCaption("Name");
$input_lastname = new InputText();
$input_lastname->setLabelCaption("Last Name");
$input_email = new InputEmail();
$input_email->setLabelCaption("E-mail");
$input_phone = new InputPhone();
$input_phone->setLabelCaption("Phone");
$input_work = new InputText();
$input_work->setLabelCaption("Work");
$input_message = new InputText();
$input_message->setLabelCaption("Message");
$mainTable->addControl($input_name, 1, 1);
$mainTable->addControl($input_lastname, 2, 1);
示例3: message
<?php
/**
* Main object.
* @author Kikapp
* @version 1.0
*/
$win = new SDPanel();
$win->setCaption("Interop");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$mainTable = new Table();
$input_message = new InputText();
$input_message->setLabelCaption("Write the message");
$input_phone = new InputPhone();
$input_phone->setLabelCaption("Write the phone number");
$button_message = new Button();
$button_message->setCaption("Message!");
$button_message->onTap(message());
$mainTable->addControl($input_message, 1, 1);
$mainTable->addControl($input_phone, 2, 1);
$mainTable->addControl($button_message, 3, 1);
$win->addControl($mainTable);
function message()
{
Interop::SendMessage($input_message, $input_phone);
}
示例4: load_image
$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()
{
$url = "http://www.demo.kikapptools.com/magento/apiKikApp/ProductImages.php?pId=" . $id;
示例5: login
/**
* Main object.
* @author Kikapp
* @version 1.0
*/
$win = new SDPanel();
$win->setCaption("Login");
$table = new Table();
$table_form = new Table();
$email = new InputEmail();
$email->setInviteMessage("E-Mail");
$pass = new InputText();
$pass->setIsPassword(true);
//it hides characters
$btn_save = new Button();
$btn_save->setCaption("LOG IN");
$btn_save->onTap(login());
$table_form->addControl($email, 1, 1);
$table_form->addControl($pass, 2, 1);
$table->addControl($table_form, 2, 1);
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table->addControl($table_button, 3, 1);
$win->addControl($table);
function login()
{
if ($email == null) {
echo "E-Mail is a required field.";
//you can't leave it blank
} else {
ProgressIndicator::ShowWithTitle("Loading...");
示例6: 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", "");
}
示例7: 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;
}
示例8: save
$email = new InputEmail();
$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 {
示例9: login
$email = new InputEmail();
$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()
{
示例10: InputText
$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");
$table->addControl($list, 1, 1);
示例11: list_companies
/**
* Main object.
* @author KikApp
* @version 1.0
*/
$win = new SDPanel();
$win->setCaption("Gecko CRM");
$mainTable = new Table();
$button = new Button();
$button->setCaption("Companies");
$button->onTap(list_companies());
$button_2 = new Button();
$button_2->setCaption("Contacts");
$button_2->onTap(list_contacts());
$button_3 = new Button();
$button_3->setCaption("Meetings");
$button_3->onTap(list_meetings());
$mainTable->addControl($button, 1, 1);
$mainTable->addControl($button_2, 2, 1);
$mainTable->addControl($button_3, 3, 1);
$win->addControl($mainTable);
function list_companies()
{
$win->Open("list_companies");
}
function list_contacts()
{
$win->Open("list_contact");
}
function list_meetings()
{
示例12: prueba
<?php
/***
* Popup
*/
$win = new SDPanel();
$win->setCaption("");
$table = new Table();
//$table -> setFormClass("form.algo");
$lugar = new Label();
$lugar->setCaption("Place");
$combo_box_lugar = new ComboBox();
$combo_box_lugar->setEmptyItem(false);
//$combo_box_fecha-> setEmptyItemText("Choose options");
$combo_box_lugar->setValues("All:1, Staples Center:2, Quickens Loans Arena:3");
$boton = new Button();
$boton->setCaption("Search");
$boton->onTap(prueba());
$table->addControl($lugar, 1, 1);
$table->addControl($combo_box_lugar, 1, 2);
$table->addControl($boton, 2, 1, 1, 2, "", "");
$win->addControl($table);
function prueba()
{
echo "Searching...";
}
示例13: 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!";
}
示例14: clientStart
$table_form = new Table();
$table_form->setRowsStyle("76dip;76dip;76dip");
$table_form->setClass("table.forms");
$username = new InputEmail();
$username->setClass("input.form");
$username->setInviteMessage("E-Mail");
$password = new InputText();
$password->setClass("input.form");
$password->setInviteMessage("Password");
$password->setIsPassword(true);
$password2 = new InputText();
$password2->setClass("input.form");
$password2->setInviteMessage("Password");
$password2->setIsPassword(true);
$btn_save = new Button();
$btn_save->setCaption("Save changes");
$btn_save->onTap(save());
$btn_save->setClass("button.blue");
$table_form->addControl($username, 1, 1);
$table_form->addControl($password, 2, 1);
$table_form->addControl($password2, 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);
function clientStart()
{
$url2 = "http://demo.kikapptools.com/Gastos/crud/getUser.php?id=" . $token;
$httpClient2 = new httpClient();
$result2 = $httpClient2->Execute('GET', $url2);
示例15: call
<?php
/**
* Main object.
* @author Kikapp
* @version 1.0
*/
$win = new SDPanel();
$win->setCaption("Interop");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$mainTable = new Table();
$input_phone = new InputPhone();
$input_phone->setLabelCaption("Write the phone number");
$button_call = new Button();
$button_call->setCaption("Call!");
$button_call->onTap(call());
$mainTable->addControl($input_phone, 1, 1);
$mainTable->addControl($button_call, 2, 1);
$win->addControl($mainTable);
function call()
{
Interop::PlaceCall($input_phone);
}