コード例 #1
0
ファイル: complex.php プロジェクト: beodob/php-ext
include_once 'PhpExt/Viewport.php';
include_once 'PhpExt/Layout/FitLayout.php';
include_once 'PhpExt/Layout/AccordionLayout.php';
include_once 'PhpExt/Layout/TabLayout.php';
include_once 'PhpExt/Layout/BorderLayout.php';
include_once 'PhpExt/Layout/BorderLayoutData.php';
include_once 'PhpExt/Layout/TabLayoutData.php';
include_once 'PhpExt/Grid/PropertyGrid.php';
/*
 * The container component for the border layout can also be a PhpExt_Viewport which will
 * fill the space provided by the browser. In these example a Panel is used to keep the website layout. 
 * See API Documentation for more info on Viewport.
 * 
 */
$viewport = new PhpExt_Panel();
$viewport->setHeight(600);
$viewport->setLayout(new PhpExt_Layout_BorderLayout());
// Norht Region
$north = new PhpExt_BoxComponent();
$north->setEl("north");
$north->setHeight(32);
$viewport->addItem($north, PhpExt_Layout_BorderLayoutData::createNorthRegion());
// South Region
$south = new PhpExt_Panel();
$south->setContentElement("south")->setCollapsible(true)->setTitle("South")->setHeight(100);
$viewport->addItem($south, PhpExt_Layout_BorderLayoutData::createSouthRegion()->setSplit(true)->setMinSize(100)->setMaxSize(200)->setMargins("0 0 0 0"));
// East Region
$east = new PhpExt_Panel();
$east->setTitle("East Size")->setCollapsible(true)->setWidth(225)->setLayout(new PhpExt_Layout_FitLayout());
$eastTabs = new PhpExt_TabPanel();
$eastTabs->setActiveTab(1)->setTabPosition(PhpExt_TabPanel::TAB_POSITON_BOTTOM)->setBorder(false);