Re: [perl-win32-gui-users] right click menu items

2002-08-27 Thread moo cow
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",

Re: [perl-win32-gui-users] Problem looking for a solution

2002-08-27 Thread Syl
> sub OKbutton_Click { .. gather data and return (-1); } > > When you return -1 in any event sub, not just in _Terminate, your window > gets destroyed. Since you cannot exit the Dialog() loop other than with -1, > there are but two ways to do it But that is my problem. I return(-1) to Setup() but

RE: [perl-win32-gui-users] Problem looking for a solution

2002-08-27 Thread Piske, Harald
sub OKbutton_Click { .. gather data and return (-1); } When you return -1 in any event sub, not just in _Terminate, your window gets destroyed. Since you cannot exit the Dialog() loop other than with -1, there are but two ways to do it a) do the error checking inside an event (namely OK_Click).

[perl-win32-gui-users] Problem looking for a solution

2002-08-27 Thread Syl
I have the following general structure that I am using to gather some intitialization data from the user. my $errormsg; do { setup(); errorcheck(); } until !$errormsg; sub setup { ... create GUI initialization window with user input fields and Win32::GUI::Dialog(); } sub OKbutton_Click {

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

2002-08-27 Thread Peter Eisengrein
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-us