Re: [PHP-GTK] GtkCombo
[email protected] ("Steph")
| Newsgroups | php.gtk |
|---|---|
| Message-ID | <044301c11cbf$e4a16c00$ac61073e@t2r1o8> |
- or there's the select-child signal, which may help :) ----- Original Message ----- From: "Frank Thomas" <[email protected]> To: "Lorrie Cooke" <[email protected]> Cc: <[email protected]> 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: [email protected] For additional commands, e-mail: [email protected] To contact the list administrators, e-mail: [email protected]