Menu States 
Author Message
 Menu States

I just got into Perl and Tk, and I'm looking for a little help with my
menus.

I have some menu items that should be disabled until a certain thing happens
(i.e. a file is opened).  I want to show them as disabled, so this is how I
initialize them.  Once the certain thing happens (i.e. file is opened) I
want some of the menu items to to be changed to 'normal'.  Is there an easy
way to do this?

By the way, I declare my menus as follows:

my $file = $menubar->cascade(-label => '~File', -menuitems =>
file_menuitems);
...
sub file_menuitems {
  [
    ['command', 'New Database',
  -command => sub {print "Open New Database\n";
...

Sam



Thu, 24 Mar 2005 09:49:02 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Changing state of Menu-Entry

2. active state/tk menu hotkey

3. Moving from state to state (newbie question)

4. menu.pl-2.3 - perl menus - Part02/02

5. menu.pl-2.3 - perl menus - Part01/02

6. menu.pl-2.3 - perl menus - Announcement

7. menu.pl-2.2 - perl menus - Part02/02

8. menu.pl-2.2 - perl menus - Part01/02

9. menu.pl-2.0 - perl menus - Part02/02

10. menu.pl-2.0 - perl menus - Part01/02

11. menu.pl v1.3 - curseperl menu facility

12. menu.pl - perl menu package

 

 
Powered by phpBB® Forum Software