|
| Click one of the tabs to see more content. Tabs are highly customizable using CSS. |
|
<?php
include_once 'phpmoko/ui/HTML.php';
include_once 'phpmoko/ui/Image.php';
include_once 'phpmoko/ui/TabPanel.php';
include_once 'phpmoko/ui/VerticalPanel.php';
class ModuleDemo implements WebModule
{
function getWidget()
{
$vPanel = new VerticalPanel();
$vPanel->setSpacing(8);
// Create a tab panel
$tabPanel = new TabPanel();
$tabPanel->setWidth('400px');
$tabPanel->setAnimationEnabled(true);
$homeText = new HTML('Click one of the tabs to see more content.');
$tabPanel->add($homeText, 'Home');
// Add a tab with an image
$vPanel2 = new VerticalPanel();
$logo = new Image('/images/powered_by_phpmoko.png');
$vPanel2->add($logo);
$tabPanel->add($vPanel2, 'PHPmoko Logo');
// Add a tab
$moreInfo = new HTML('Tabs are highly customizable using CSS.');
$tabPanel->add($moreInfo, 'More Info');
// Return the content
$tabPanel->selectTab(0);
$tabPanel->setId('cwTabPanel');
$vPanel->add($tabPanel);
return $vPanel;
}
}
?>
|
|