How to install a signal handler to an pixmap?
- From: David Weisgerber <kx1 gmx net>
- To: gtk-perl-list gnome org
- Subject: How to install a signal handler to an pixmap?
- Date: Thu, 5 Apr 2001 17:59:34 +0000
Hi,
I've got another problem where can't help myself....
How do I connect a signal handler to an pixmap in a table ???
I've written the following:
$keinbutton[$kein]->set_events( [ $keinbutton[$kein]->get_events(),
'button-press-mask'] );
$keinbutton[$kein]->signal_connect("button_press_event", sub { print "Drückte
$y\n" }, $y);
Where $keinbutton[$kein] is a pixmap and $y is an integer which I later want
to give to the routine which is called by this event when it works.
My code won't compile because I think $keinbutton[$kein]->get_events() isn't
valid so it gives an undefined value back. I would need it for a game.... So
how can I connect the signal handler correct so that I don't have to give up
my table or something....
Thx,
kx
PS: I am sorry for being such a newbie to Gtk-perl, I only made non-graphic
progs before.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]