Re: GtkCombo

From: Date: Sat, 04 Aug 2001 07:55:39 +0000
Subject: Re: GtkCombo
References: 1  Groups: php.gtk 
Request: Send a blank email to php-gtk+get-2496@lists.php.net to get a copy of this message
On Saturday 04 August 2001 06:35, Lorrie Cooke wrote: > Hi :) > > using the following code for a GtkCombo: > > $combo = &new GtkCombo(); > $combo->set_popdown_strings($dropbox); > $combo_entry = $combo->entry; > $vbox->pack_start($combo); > $combo->show(); > > I am able to display the combo box fine, What im not sure on is how to > get the selected item from the drop box into a function... > > I thought it would be done through the $combo_entry variable but that > returns as an object. > > The manual doesnt show any "get" methods for combo, so im not sure on > how to get the selected item out .... $combo_entry = $combo->entry; $combo_entry->get_text(); If you want to call your function when the user select an Item from the List try: $combolist = $combo->list; $combolist->connect('button_press_event', 'your_function'); -Frank -- Bender: Stay away from our women. You got metal fever, baby, metal fever!

« previous php.gtk (#2496) next »