Re: GtkCombo
| From: | Lorrie Cooke | Date: | Sat, 04 Aug 2001 13:42:28 +0000 |
| Subject: | Re: GtkCombo | ||
| References: | 1 2 3 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-2498@lists.php.net to get a copy of this message | ||
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