note 120581 added to class.ui-window
| From: | everton3x at gmail dot com | Date: | Fri, 03 Feb 2017 12:58:45 +0000 |
| Subject: | note 120581 added to class.ui-window | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-208748@lists.php.net to get a copy of this message | ||
This is a example to wizard layout in UI library:
<?php
/*
* Wizard sample layout builded with PHP UI
*/
use UI\Window;
use UI\Size;
use UI\Controls\Button;
use UI\Controls\Grid;
use UI\Controls\Box;
use UI\Controls\Form;
use UI\Controls\Entry;
use UI\Controls\Label;
/*
* The window
*/
$window = new Window('Wizard Sample Layout', new Size(640, 480), TRUE);
$window->setMargin(true);
/*
* Wizard content (sample)
*/
$content = new Form();
$content->setPadded(true);
$content->append('User:', new Entry());
$content->append('Password:', new Entry(Entry::Password));
/*
* Layout to title, content and buttons
*/
$grid = new Grid();
$grid->setPadded(false);
/*
* Title
*/
$grid->append(new Label('Wizard Sample'), 0, 0, 6, 1, true, Grid::Fill, false,
Grid::Fill);
/*
* Append content
*/
$grid->append($content, 0, 1, 6, 1, false, Grid::Fill, true, Grid::Fill);
/*
* Left buttons
*/
$left_box = new Box(Box::Horizontal);
$left_box->append(new Button('&About'));
$left_box->append(new Button('&Help'));
/*
* Right buttons
*/
$right_box = new Box(Box::Horizontal);
$right_box->append(new Button('&Back'));
$right_box->append(new Button('&Forward'));
$right_box->append(new Button('&Close'));
/**
* Append buttons
*/
$grid->append($left_box, 0, 2, 1, 1, true, Grid::Start, false, Grid::Fill);
$grid->append($right_box, 5, 2, 1, 1, true, Grid::End, false, Grid::Fill);
/*
* Append layout and show.
*/
$window->add($grid);
$window->show();
UI\run();
?>
----
Server IP: 72.52.91.14
Probable Submitter: 187.52.52.82
----
Manual Page -- http://php.net/manual/en/class.ui-window.php
Edit -- https://master.php.net/note/edit/120581
Del: integrated -- https://master.php.net/note/delete/120581/integrated
Del: useless -- https://master.php.net/note/delete/120581/useless
Del: bad code -- https://master.php.net/note/delete/120581/bad+code
Del: spam -- https://master.php.net/note/delete/120581/spam
Del: non-english -- https://master.php.net/note/delete/120581/non-english
Del: in docs -- https://master.php.net/note/delete/120581/in+docs
Del: other reasons-- https://master.php.net/note/delete/120581
Reject -- https://master.php.net/note/reject/120581
Search -- https://master.php.net/manage/user-notes.php