Re: Fw: [PHP-GTK] getting the index of selected item in a combo box
| From: | Henning Sprang | Date: | Wed, 08 May 2002 13:51:04 +0000 |
| Subject: | Re: Fw: [PHP-GTK] getting the index of selected item in a combo box | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-1939@lists.php.net to get a copy of this message | ||
On Wed, May 08, 2002 at 02:37:53PM +0100, Steph wrote:
> oops .. it needs to be run from a select-child signal by the looks of it.
>
> function callback($child) {
> $index = $list->child_position($child);
> }
>
> either that or you could use $list->selection[0] to retrieve the child so long as
> you're in single selection mode.
>
yes, but if i only need the index ( as my data i need for further transaction
based on that selection doesn't fit in the list or is not human-friednly, but
written in another array) i have to write
$mylist->child_position($mylist->selection[0]);
it's a bit ugly, but works.
btw: as i am working the first time on a real app instead of only playing
around and translating, i start to see it's really difficult
to do something serious halfway quick and easy as the manual is really missing
lot of important info, or if it's there it's not easy to be found. maybe i am
not deep enough into it because i lastly worked more with superwaba, but i
start thinking to really stop translation and concentrating of making a really
good englisch manual, first. what do you think? is this just my view that it
is so hard to work with it? or is this only if one isn't familiar with gtk?
--
Henning Sprang, henning@sprang.de, http://www.sprang.de/