Home » XML » XML_XUL » Bug #6158
Add function for resizable tree columns
Details
| Request #6158 | Add function for resizable tree columns |
|---|---|
| Submitted | 2005-12-05 16:54 UTC |
| From | mike at eire dot ca |
| Assigned | amir |
| Status | Closed |
| Package | XML_XUL |
| PHP Version | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2005-12-05 16:54 UTC] mike at eire dot ca
Description:
------------
I just found this class, hope it's not dead or anything! I extended tree.php to include resizable columns, and I think this is definitely a must-have for other XUL builders as well. I've put it here as a separate function, but when people see columns, they expect them to be resizable, so the original setColumns functions should probably be modified.
Test script:
---------------
/**
* set the amount of columns, puts sizers between each one
*
* @access public
* @param integer number of columns
*/
function setSizableColumns( $columns )
{
$this->_columns = $columns;
$this->childNodes[0] = &$this->_doc->createElement('Treecols');
$atts = func_get_args();
array_shift($atts);
for ($i=0; $i<$columns; $i++) {
if (!isset($atts[$i])) {
$atts[$i] = array();
}
$this->childNodes[0]->appendChild( $this->_doc->createElement('Treecol', $atts[$i]));
$this->childNodes[0]->appendChild( $this->_doc->createElement('Splitter', array('collapse' => 'before', 'class' => 'tree-splitter')));
}
}
[2006-05-12 08:02 UTC] amir at php dot net
This bug has been fixed in CVS.
If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.
Now that's in CVS, you can generate resizeable tree columns by passing a boolean argument to setColumns.