in reply to Re^3: How to get a window's menu as a Win32::GUI::Menu object?
in thread How to get a window's menu as a Win32::GUI::Menu object?
Which is why I don't understand why it's relevant. How does it help my solve the problem?
OTOH, the code you have posted includes no bless anywhere :)Fair enough:
You know, I could, or you could just read the link I posted :)#!perl use Win32::GUI; &Main(); exit 0; sub Main { my $Menu = Win32::GUI::MakeMenu( '&Program' => 'Program', ' > &Alpha' => { -name => 'Alpha', -onClick => \&Alpha_Select +}, ' > &Beta' => { -name => 'Beta', -onClick => \&Beta_Select }, ); my $WinMain = Win32::GUI::Window->new( -name => 'Main', -menu => $Menu, -text => 'Menu Test', -width => 300, -height => 200, -onTerminate => \&Main_Terminate, ); $WinMain->Show(); Win32::GUI::Dialog(); } sub Main_Terminate { -1; } sub Alpha_Select { 1; } sub Beta_Select { my($Window)=@_; my $menuhandle=$Window->GetMenu(); my $menu = bless { -handle => $menuhandle }, 'Win32::GUI::Menu'; $menu->{'Beta'}->Enabled(0); # Doesn't work. return 1; }
You posted a link to the tutorial. As I explained, I've already read the tutorial. I read it AGAIN after you posted the link, and yet AGAIN just now. I've read it three times in the last hour and still -- I don't see anything that's relevant to the problem, so again, can you please point out specifically what it is in the tutorial that's going to help me solve my problem?
Also, where are you getting your information from?http://perl-win32-gui.sourceforge.net/cgi-bin/docs.cgi
http://www.mail-archive.com/perl-win32-gui-users@lists.sourceforge.net/msg00945.html
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to get a window's menu as a Win32::GUI::Menu object?
by Anonymous Monk on Feb 17, 2013 at 10:13 UTC | |
by shadrack (Acolyte) on Feb 17, 2013 at 10:44 UTC | |
by Anonymous Monk on Feb 17, 2013 at 11:16 UTC |