Recent blog posts
- DrupalCamp CA / Guatemala 2010
- Content Profile Form inside User Edit for Drupal 6
- How use views arguments in PHP Code for Drupal 6
- Drupal Contribution: Generate vancode using mysql alone
- Drupal Module Patch: Belated PNG
- Drupal Patch to Notify Module to process only new content
- Notify module: Handle both published and unpublished entries
- osCommerse Authentication | New Drupal Module
- Single Sign On between Drupal and Moodle
- Share SSH Public Key Authentication
QTabPanel a new QCubed Plug-in
Submitted by enzo on Wed, 09/30/2009 - 15:02
Hello 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

