Exemplo n.º 1
0
<?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();
}
Exemplo n.º 2
0
<?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...";
}