Re: Fw: [PHP-GTK] getting the index of selected item in a combo box

From: Date: Wed, 08 May 2002 13:58:12 +0000
Subject: Re: Fw: [PHP-GTK] getting the index of selected item in a combo box
References: 1 2  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-1940@lists.php.net to get a copy of this message
I've been waiting for you to do that for months :) ----- Original Message ----- From: "Henning Sprang" <henning@sprang.de> To: "Steph" <sfox@php.net> Cc: "PHP-GTK gen" <php-gtk-general@lists.php.net> Sent: Wednesday, May 08, 2002 2:51 PM Subject: Re: Fw: [PHP-GTK] getting the index of selected item in a combo box > 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/

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