Re: add_events in PHP-GTK 2
| From: | Ivan Rodriguez | Date: | Fri, 22 Jul 2005 08:10:19 +0000 |
| Subject: | Re: add_events in PHP-GTK 2 | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-6091@lists.php.net to get a copy of this message | ||
Hi Scott, do you realize the window?¿ is necesary to work add_events,
try with set_events too.
Try this:
<?php
function popup()
{
print_r(func_get_args());
}
$window = new GtkWindow;
$window->connect_object('destroy', array('gtk', 'main_quit'));
$window->set_events(GDK_BUTTON_PRESS_MASK);
$window->connect('button-press-event', 'popup');
$window->set_default_size(500, 500);
$window->show_all();
gtk::main();
?>
On 7/21/05, Scott Mattocks <scott@crisscott.com> wrote:
> Hello,
>
> Does add_events() work in PHP-GTK 2? I don't get any errors but I can't
> seem to get a widget to react to any new event that I have added. If
> anyone has a short example I would love to see it.
>
> Thanks,
> --
> Scott Mattocks
> scott@crisscott.com
> http://www.crisscott.com
> http://pear.php.net/user/scottmattocks
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>