Re: clist

From: Date: Fri, 21 May 2004 14:30:27 +0000
Subject: Re: clist
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-4530@lists.php.net to get a copy of this message
Rhys, Can't remember where I found this but, given a cList widget, $cListPatientID, the selection method seems to return an array of the selected rows (where each row may hold more than one value, i.e., have multiple columns). selection[0] therefore holds the values from the first row. get_text($row,0) called on the result of the selection call returns the first value of the row selected. If your cList had many columns, you could obviously extract more data from it by incrementing your array index. $row = $cListPatientID->selection[0]; $selectedPID = $cListPatientID->get_text($row,0); This doesn't answer your second question, but hope it helps you some. dave > What methods can I use with the clist to extract information from rows and perform actions based on it. Is it possible to produce > a context menu? The PHP-GTK manual is rather vague on this, any example appreciated > Regards, > Rhys Campbell

« previous php.gtk.general (#4530) next »