Re: [gtk-list] Right Button menus
- From: Dermot Musgrove <dermot glade perl connectfree co uk>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Right Button menus
- Date: Tue, 02 May 2000 07:50:30 +0000
"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]