label with context menu (populate-popup)
- From: Peter Daum <gator_ml yahoo de>
- To: gtk-perl-list gnome org
- Subject: label with context menu (populate-popup)
- Date: Wed, 28 Mar 2007 20:45:58 +0200
Is there an easy way to get a context menu on a label?
According to the documentation, it should support a
'populate-popup' signal, so it looks like this should be
painless. If I try the following (which works fine on other
occasions):
$label->signal_connect('populate-popup',
sub {
warn "populate";
my ($widget, $mnu ) = @_;
my $item=Gtk2::MenuItem->new('Show Latin');
$item->signal_connect_after('activate',
sub {warn "do something ...";});
$mnu->append($item);
$item->show();
});
I get no warning, only the signal is never triggered.
The documentation for GtkLabel doesn't say when this
signal occurs, I just assumed it would be triggered
whith the right mouse button...
Regards,
Peter Daum
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]