note 148 added to gtk.gtkclist.php
| From: | ahmad_NOSPAM at NOSPAM_bitbuilder dot com | Date: | Sun, 02 Jun 2002 01:03:49 +0000 |
| Subject: | note 148 added to gtk.gtkclist.php | ||
| Groups: | php.gtk.webmaster | ||
| Request: | Send a blank email to php-gtk-webmaster+get-485@lists.php.net to get a copy of this message | ||
Another method that is not listed is get_selection_info( x, y );<br>
I connet a "button-press-event" to the CList (or CTree), the call back's first
argument is an event.<br>
To get the exact item that was clicked on:<br>
$clist = $new GtkCList();
$clist->connect( "button-press-event", "on_clist_button_press" );
..
.
function on_clist_button_press( $event)
{
print_r( $event); # See a bunch of usefull event stuff
$row_col = $clist->get_selection_info( $event->x, $event->y );
print_r( $row_col ); # Array holding the row and column of the selected item
}
http://gtk.php.net/manual/en/gtk.gtkclist.php