This problem is harder than it seems at first.
The main problem is how do I detect a right click on a menu (Such as the Exit option on the File menu found in most windows programs)?

Also, to create the menu in your example I'd do;
$Menu =  Win32::GUI::MakeMenu(
    "Popup Menu" => "PopUpMenu",
    ">  &Edit"    => "PopupEdit",
    ">  Exit" => "PopupExit",
);
or something similar right?  When i put your code in the _Click action for the menu item, the menu pops up but is blank (no text appears on it, it's only a few pixels wide).  Am I doing something wrong here?

Nick

Peter Eisengrein wrote:
RE: [perl-win32-gui-users] right click menu items

Assuming $menu 'PopUpMenu' already exists, then do the following:

my ( $x, $y ) = Win32::GUI::GetCursorPos ();
$Window->TrackPopupMenu( $menu -> {'PopUpMenu'}, $x, $y );




-----Original Message-----
From: moo cow [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 22:28
To: perl-win32-gui-users@lists.sourceforge.net
Subject: [perl-win32-gui-users] right click menu items


Hi,
How do I make it so I can right click a menu item, and it brings up a popup menu?

Nick

------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users

Reply via email to