Re: GtkCombo

From: Date: Sat, 04 Aug 2001 08:31:35 +0000
Subject: Re: GtkCombo
References: 1 2  Groups: php.gtk 
Request: Send a blank email to php-gtk+get-2497@lists.php.net to get a copy of this message
- or there's the select-child signal, which may help :) ----- Original Message ----- From: "Frank Thomas" <frank@thomas-alfeld.de> To: "Lorrie Cooke" <gtk@thedaisypatch.net> Cc: <php-gtk@lists.php.net> Sent: Saturday, August 04, 2001 8:55 AM Subject: Re: [PHP-GTK] GtkCombo 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! -- PHP GTK Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-gtk-unsubscribe@lists.php.net For additional commands, e-mail: php-gtk-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.gtk (#2497) next »