TXT
Reply to comment
QTabPanel a new QCubed Plug-in
Submitted by enzo on Wed, 09/30/2009 - 15:02Hello folks
Last week I sent my last contribution to QCubed project a new plug-in called QTabPanel
QTabPanel offers a way to wrap a tabular interface, similar to what you frequently see in rich-client applications.
Using it is really simple: create a container QTabPanel control. Then, create QTabPanelSections, one for each tab, specifying the QTabPanel as their parent. Remember how you have to pass the parent in the constructor of any QControl? Here, you pass in the QTabPanel, not the $this:
$this->myTabPanel = new QTabPanel($this);
$sectionA = new QTabPanelSection($this->myTabPanel);
$sectionB = new QTabPanelSection($this->myTabPanel);Then, just add your QControls to the right sections - the way to do it is again by specifying the section as the parent parameter in the QControl constructor. So really, what you're doing is specifying a hierarchy of visual elements. The root of the hierarchy is the parent QForm; it hosts a tab panel; the tab panel hosts the sections; each of the sections hosts one or more controls.
Enjoy it.
enzo

