GtkTreeItem::set_subtree
void
set_subtree
(
GtkTree
subtree
);
Sets a GtkTree as the subtree (or tree of children)
for a node. A GtkTreeItem may only have one subtree.
Attempting to set a second tree will generate a Gtk-Warning. The orginal
subtree will not be overwritten or removed.
A node that has a subtree will be shown with a box to the left containing
either a plus for a collapsed tree or a minus for an expanded tree.
Example 53. Adding a subtree
<?php
// Create the top level tree item.
$tree =& new GtkTree();
$treeItem =& new GtkTreeItem('Top Level Item');
$tree->append( $treeItem);
// Create the sub tree with one sub tree item.
$subTree =& new GtkTree;
$subTreeItem =& new GtkTreeItem('Sub Level Item');
$subTree->append($subTreeItem);
// Add the sub tree to the top level item.
$treeItem->set_subtree($subTree);
?>
|
Controlling whether or not the subtree is visible is done using
expand() and
collapse() functions.