Exemplo n.º 1
0
for ($i = 0; $i < 20; $i++) {
    if ($i % 2 == 0) {
        $pares[] = new ComboOption("numero {$i}", "Número {$i}");
    } else {
        $impares[] = new ComboOption("{$numero} {$i}", "Número {$i}");
    }
}
$combogroup->addGroup('pares', 'pares', $pares);
$combogroup->addGroup('impares', 'impares', $impares, true);
$combogroup->setDefault('Número 2');
$combogroup->setComment('numeros');
/*Text Area*/
$fieldset2 = new FieldSet('Botones');
$fieldset2->add(new Button('suma', 'suma'));
$fieldset2->add(new Button('resta', 'resta'));
$main_box = new HBox();
$left = new VBox();
$right = new VBox();
$main_box->packStart($left);
$main_box->packStart($right);
$entry = new Entry('apellido_1', '', 'Apellido Paterno');
$entry->setComment('Apellido de tu jefe');
$entry2 = new Entry('nombre', '', 'Nombre');
$entry2->setComment('Apellido de tu abuelita');
$left->packStart($entry2);
$left->packStart($entry);
$left->packStart(new Entry('apellido_2', '', 'Apellido Materno'));
/*right side*/
/*right up*/
$right_up = new HBox();
$right_up_left = new VBox();
Exemplo n.º 2
0
$radio = new RadioButtons("favoritos", "vertical");
$radio->AddOption("Jaws Project", "jawsproject");
$radio->AddOption("Piwi Project", "piwiproject");
$radio->SetDefault("piwiproject");
//$radio->Show ();
$check = new CheckButtons("favoritos2", "vertical");
$check->AddOption("Jaws Project", "jawsproject");
$check->AddOption("Piwi Project", "piwiproject");
$check->SetDefault("piwiproject");
$spin = new SpinButton("spin", 10);
$spin->SetDefault(3);
$vbox = new VBox();
$vbox->PackStart($comboimage);
$vbox->PackEnd($entry);
$vbox->PackStart($check);
$hbox = new HBox();
$hbox->PackStart($button);
$hbox->PackStart($radio);
$hbox->PackEnd($vbox);
//$hbox->Show ();
$toolbar = new Toolbar();
$toolbar->Add($button);
$toolbar->Add($entry);
$toolbar->Add($comboimage);
$toolbar->Add($spin);
$toolbar->SetStyle("background-color: #331");
$editor = new VBox();
$editor->PackStart($toolbar);
$editor->PackStart($textarea);
$viewport = new ViewPort("viewport", 600, 180);
$viewport->Add($editor);
Exemplo n.º 3
0
$menu->Add("Editar/Pegar/Normal");
$menu->Add("Archivo/Guardar/Destrozar");
echo $menu->GetPiwiXML();
echo "\n\n\n";
$toolbar = new Toolbar();
$toolbar->Add($button);
$toolbar->Add($entry);
$toolbar->Add($comboimage);
$toolbar->SetStyle("background-color: #331");
echo $toolbar->GetPiwiXML();
echo "\n\n\n";
$vbox = new VBox();
$vbox->PackStart($comboimage);
$vbox->PackEnd($entry);
$vbox->PackStart($check);
$hbox = new HBox();
$hbox->PackStart($button);
$hbox->PackStart($radio);
$hbox->PackEnd($vbox);
echo $hbox->GetPiwiXML();
echo "\n\n\n";
$editor = new VBox();
$editor->PackStart($toolbar);
$editor->PackStart($textarea);
echo $editor->GetPiwiXML();
echo "\n\n\n";
$viewport = new ViewPort("viewport", 600, 180);
$viewport->Add($editor);
echo $viewport->GetPiwiXML();
echo "\n\n\n";
$hidden_field = new HiddenEntry("nombre", "valor");