这是一个 UI 库中向导布局的示例
<?php
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;
$window = new Window('向导示例布局', new Size(640, 480), TRUE);
$window->setMargin(true);
$content = new Form();
$content->setPadded(true);
$content->append('用户:', new Entry());
$content->append('密码:', new Entry(Entry::Password));
$grid = new Grid();
$grid->setPadded(false);
$grid->append(new Label('向导示例'), 0, 0, 6, 1, true, Grid::Fill, false, Grid::Fill);
$grid->append($content, 0, 1, 6, 1, false, Grid::Fill, true, Grid::Fill);
$left_box = new Box(Box::Horizontal);
$left_box->append(new Button('&关于'));
$left_box->append(new Button('&帮助'));
$right_box = new Box(Box::Horizontal);
$right_box->append(new Button('&后退'));
$right_box->append(new Button('&前进'));
$right_box->append(new Button('&关闭'));
$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);
$window->add($grid);
$window->show();
UI\run();
?>