Getting "button-press-event" on a ToolButton


I am trying to create a context menu activated by the
right mouse button on a button in a toolbar,
doing something like

$button->signal_connect('button-press-event', sub {
   my $bt = $_[1]->button;
   $mnu->popup(undef,undef,undef,undef,$bt,0)if $bt == 3;};

With regular buttons, this works without a problem,
but I can't figure out any way how to receive the
button press events on the tool button.

I tried a bunch of different variations (like setting "add_events('button-press-mask')" on all
widgets, experiments with eventbox, ...).

Any ideas?

                 Peter Daum

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]