From: moo c. <mew...@ip...> - 2002-08-28 01:47:33
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"> <title></title> </head> <body> This problem is harder than it seems at first.<br> 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)?<br> <br> Also, to create the menu in your example I'd do;<br> $Menu = Win32::GUI::MakeMenu(<br> "Popup Menu" => "PopUpMenu",<br> "> &Edit" => "PopupEdit",<br> "> Exit" => "PopupExit",<br> );<br> 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?<br> <br> Nick<br> <br> Peter Eisengrein wrote:<br> <blockquote type="cite" cite="mid75B5E19362A8D611844C0008023E3337201624@MAIL-01"> <meta http-equiv="Content-Type" content="text/html; "> <meta name="Generator" content="MS Exchange Server version 5.5.2650.12"> <title>RE: [perl-win32-gui-users] right click menu items</title> <p><font size="2">Assuming $menu 'PopUpMenu' already exists, then do the following:</font></p> <p><font size="2">my ( $x, $y ) = Win32::GUI::GetCursorPos ();</font><br> <font size="2">$Window->TrackPopupMenu( $menu -> {'PopUpMenu'}, $x, $y );</font></p> <br> <br> <br> <p><font size="2">-----Original Message-----</font><br> <font size="2">From: moo cow [<a href="mailto:mew...@ip...">mailto:mew...@ip...</a>]</font> <br> <font size="2">Sent: Monday, August 26, 2002 22:28</font><br> <font size="2">To: <a class="moz-txt-link-abbreviated" href="mailto:per...@li...">per...@li...</a></font><br> <font size="2">Subject: [perl-win32-gui-users] right click menu items</font> </p> <br> <p><font size="2">Hi,</font><br> <font size="2">How do I make it so I can right click a menu item, and it brings up a popup menu?</font></p> <p><font size="2">Nick</font></p> <p><font size="2">------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! <a href="https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390" target="_blank">https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390</a> _______________________________________________ Perl-Win32-GUI-Users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Per...@li...">Per...@li...</a> <a href="https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users</a></font></p> </blockquote> </body> </html> |