GtkTree::select_item

void select_item (int position );

Highlights the node in position as selected. This will cause the node to emit the "select" signal. Selecting a node which is already selected will unselect that node.

Ejemplo 52. Selecting a node twice

<?php
// Call back function to notify when an item is deselected
function itemDeselected()
{
    echo 'A tree item was deselected!';
}

// Create a tree
$tree =& new GtkTree;

// Create an item and add it to the tree
$treeItem =& new GtkTreeItem('Select me twice');
$tree->append($treeItem);

// Select the item twice and see what happens
$tree->select_item(0);
$tree->select_item(0); // itemDeselected() will be called.
?>

Node positions are indexed begining with zero. The fourth node in a tree is in position three.

See also: unselect_item() , select_child() , unselect_child() .