Re: combo box probelm
| From: | Steph | Date: | Thu, 24 May 2001 12:57:30 +0000 |
| Subject: | Re: combo box probelm | ||
| References: | 1 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-1911@lists.php.net to get a copy of this message | ||
Here you go -
<?
dl('php_gtk.' . (strstr(PHP_OS, 'WIN') ? 'dll' : 'so')) ||
die("Can't load php_gtk module!\n");
function quitApplication() {
Gtk::main_quit();
}
$window = &new GtkWindow();
$window->set_title("testbay window");
$window->set_default_size(320, 200);
$window->set_uposition(0, 0);
$window->connect('delete_event', 'quitApplication');
$combo = &new GtkCombo();
$item1 = &new GtkListItem('one');
$item1->show();
$item2 = &new GtkListItem('two');
$item2->show();
$item3 = &new GtkListItem('three');
$item3->show();
$array = array($item1, $item2, $item3);
$list = $combo->list;
$list->append_items($array);
$window->add($combo);
$combo->show();
$window->show_all();
Gtk::main();
?>
----- Original Message -----
From: "Andrew Thompson" <andrew.thompson@neonetworks.co.uk>
To: <php-gtk@lists.php.net>
Sent: Thursday, May 24, 2001 11:04 AM
Subject: [PHP-GTK] combo box probelm
hi there
i am having some problems connecting the GtkList past of a GtkCombo.
i have tried to do it this way:
$GtkList = $combo -> GtkList
$GtkList -> connect('selection-changed', function );
i have also tried connecting them on the one line but that doesnt work either
any help would be appreciated
thanks
Andrew Thompson
NEOnetworks - "Designing & Providing"
www.neonetworks.co.uk
andrew.thompson@neonetworks.co.uk