GtkList

From: Date: Sun, 24 Jun 2001 10:30:16 +0000
Subject: GtkList
Groups: php.gtk 
Request: Send a blank email to php-gtk+get-1956@lists.php.net to get a copy of this message
Could anyone check this code? Why it does not show a list with "item1", "item2" and "item3"? Thanx <? if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') dl('php_gtk.dll'); else dl('php_gtk.so'); function show_list() { $wnd = &new GtkWindow(); $lst = &new GtkList(); $wnd->connect_object('destroy', array('gtk', 'main_quit')); $wnd->set_usize(400, 400); $lst->set_selection_mode(GTK_SELECTION_BROWSE); $wnd->add($lst); $wnd->show_all(); $items = array("item1", "item2", "item3"); $list_items = array(); // will be array of GtkListItems foreach($items as $listed) { $list_items[] = &new GtkListItem($listed); } if (count($list_items) > 0) $lst->append_items($list_items); } show_list(); Gtk::main(); ?>

« previous php.gtk (#1956) next »