Re: How to install a signal handler to an pixmap?
- From: Pavel Rousnak <pr rpb ru>
- To: gtk-perl-list gnome org
- Subject: Re: How to install a signal handler to an pixmap?
- Date: Wed, 16 May 2001 19:00:00 +0400
I've got another problem where can't help myself....
How do I connect a signal handler to an pixmap in a table ???
GtkPixmap is based on GtkMisc (not GtkWidget) so it can't receive signals.
But this problem can be solved: you just have to create GtkEventBox and
add your pixmap to it like following:
my $my_pixmap = Gtk::Pixmap->new();
......
my $ev_box = Gtk::EventBox->new();
$ev_box->add($my_pixmap);
$ev_box->signal_connect ('button_press_event', \&my_handler, $my_pixmap, ...);
I did not test this approach for Gtk::Pixmap but did it for label Gtk::Label
which is based on GtkMisc too.
--
Best regards
Pavel.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]