Re: [gtk-list] Right Button menus



"M.N.S.S.K.Pavan Kumar" wrote:
> 
> This question was asked by some one before , How to create right button
> menus.Please help me in this matter.
Hi, in perl you can do something like this:

$widget_to_right_click_on->signal_connect( 'button_press_event', "handler");

and then in sub handler {
my ($class, $e) = @_;

if ($e->{'button'} == 3) {
    my $menu = new Gtk::Menu;
    $item = Gtk::MenuItem('New');
    $item->show;
    $menu->append($item);
    ...
    ... 
    $menu->popup(undef, undef, 0, 0);

HTH, Dermot




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