Re: accelerators and stock items - working or not working?

From: Date: Mon, 03 Jul 2006 06:21:38 +0000
Subject: Re: accelerators and stock items - working or not working?
References: 1  Groups: php.gtk.dev php.gtk.general 
Request: Send a blank email to php-gtk-dev+get-3183@lists.php.net to get a copy of this message
Steph, > Anyone got time to look into this at all? Or is it just a Windows thing? The following code works for me: <?php $wnd = new GtkWindow(); $wnd->connect_simple('destroy', array('Gtk', 'main_quit')); $group = new GtkAccelGroup(); $wnd->add_accel_group($group); $new = new GtkImageMenuItem(Gtk::STOCK_NEW, $group); $new->connect_simple('activate', 'onNew'); function onNew() { echo "new\n"; } $bar = new GtkMenuBar(); $file = new GtkMenuItem('_File'); $bar->add($file); $fMenu = new GtkMenu(); $file->set_submenu($fMenu); $fMenu->add($new); $wnd->add($bar); $wnd->show_all(); Gtk::main(); ?> -- Regards/MfG, Christian Weiske

« previous php.gtk.dev (#3183) next »