Re: [PHP-GTK] GtkCombo
[email protected] (Lorrie Cooke)
| Newsgroups | php.gtk |
|---|---|
| Message-ID | <[email protected]> |
HI,
Thanks for info,
That helped get the selection, I am also trying to send the gtkDialog to
the function(so i can destroy the dialog window) like this:
$list->connect('select-child', select_db, $listed,$query);
(where $query= &new GtkDialog)
however in the called function $query returns the last item in the
dropbox array..
function select_db($list,$listed,$query){
global $dropbox;
$number = $list->child_position($listed);
echo "$dropbox[$number] - $query\n";
}
function connect_window() {
global $dropbox;
$query = &new GtkDialog();
$query->set_title('Connect');
$query->set_default_size(150, 100);
$combo = &new GtkCombo();
$list = $combo->list;
$list_items = array();
foreach($dropbox as $listed) {
$show_items = $list_items[] = &new GtkListItem($listed);
$show_items->show();
}
if (count($list_items) > 0) $list->append_items($list_items);
$list->set_selection_mode(GTK_SELECTION_SINGLE);
$list->connect('select-child', select_db, $listed,$query);
$vbox->pack_start($combo);
$combo->show();
$query->show_all();
}
thanks for the help :))
Loll