Tried that,

The menu item was disabled but not grayed out.

Also the menubar seems to begin at 1 instead of 0 for its items; so 
disabling 1 actually gets the 'File' menu.

I also tried just putting a command on the menubar
$menubar->command(-label=>"Test");
and disabled it thinking that it might behave differently than a cascade 
menu.

No Luck.

Gary T




"Jack D" <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
01/10/2007 07:23 PM

To
"'Gary D Trosper'" <[EMAIL PROTECTED]>, "'Bill Luebkert'" 
<[EMAIL PROTECTED]>
cc
perl-win32-users@listserv.ActiveState.com
Subject
RE: Perl TK Graying out disabled menu items






Add this line to the code I previously sent:
 
$menubar->entryconfigure(1,-state=>'disabled');
 
That should do it.
 
Jack

From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of 
Gary D Trosper
Sent: Wednesday, January 10, 2007 6:14 PM
To: Bill Luebkert
Cc: perl-win32-users@Listserv.ActiveState.com
Subject: Re: Perl TK Graying out disabled menu items


That grays out the last item in the Edit drop down menu. 
It doesn't gray out Edit itself. 

Still searching, 
Gary T 



Bill Luebkert <[EMAIL PROTECTED]> 
01/10/2007 05:08 PM 


To
Gary D Trosper <[EMAIL PROTECTED]> 
cc
perl-win32-users@Listserv.ActiveState.com 
Subject
Re: Perl TK Graying out disabled menu items








Gary D Trosper wrote:
> 
> Thanks Jack that works!
> 
> However, he said in frustration,   I'm trying to gray out 'Edit'  on the 

> main menubar.
> 
> Using the "tried and true" cut and paste method I slipped this line into 

> the end of your code (Your code works)
> 
> $menubar->entryconfigure('Edit', -state=>'disabled');

my $m = $menus{'Edit'}->cget(-menu);
$m->entryconfigure('last', -state => 'disabled');

> and I get "Bad name after Edit on line 31"
> 
> Still struggling but pointed in the right direction,

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to