use warnings; use strict; use Tk; my $mw = MainWindow->new(); my ( $var, $tvar ); my $opt = $mw->Optionmenu( -options => [ [ jan => 1 ], [ feb => 2 ], [ mar => 3 ], [ apr => 4 ], [ may => 5 ], [ jun => 6 ], [ jul => 7 ], [ aug => 8 ] ], -command => sub { print "got: ", shift, "\n" }, -variable => \$var, -textvariable => \$tvar, )->pack; # Now reconfigure the indicator button $opt->configure( -indicatoron => 0 ); MainLoop;