RE: [PHP-GTK] clist
| From: | Rhys Campbell | Date: | Fri, 21 May 2004 14:35:55 +0000 |
| Subject: | RE: [PHP-GTK] clist | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-4531@lists.php.net to get a copy of this message | ||
Thanks, I'll get cracking on coming up with something and hopefully have an example in the
manual.
-----Original Message-----
From: dpgirago@mdanderson.org [mailto:dpgirago@mdanderson.org]
Sent: 21 May 2004 15:30
To: php-gtk-general@lists.php.net
Subject: Re: [PHP-GTK] clist
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