Selects the node and emits the select signal.
<?php function treeItemSelected() { echo "A tree item was selected.\n"; } // Create a new button. $button =& new GtkButton('Press Me'); // Create a new tree item $treeItem =& new GtkTreeItem('I\'ll get selected.'); // Have the treeItemSelected function called when // the tree item is selected. $treeItem->connect('select', 'treeItemSelected'); // When the button is clicked the treeItemSelected // function will be called and a message will be // printed to the terminal. $button->connect('clicked', array(&$treeItem, 'select')); ?> |
This method is connected to the "clicked" signal on construction.
See also: deselect()