Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Thanks#!/usr/bin/perl -w use Tk; use Strict; $mw = MainWindow->new(-title=>"Option Menu"); my $month; #$month='August'; #None of these seem to work $month='08'; #$month=8; my $start_month_field=$mw->Optionmenu( -variable => \$month)->pack; $start_month_field->addOptions([January=>'01'],[Feburary=>'02'],[March +=>'03'],[April=>'04'],[May=>'05'],[June=>'06'], [July=>'07'],[August=>'08'],[September=>'09'],[October=>'10'], +[November=>'11'],[December=>'12']); my $label=>$mw->Label(-textvariable=>\$month)->pack(); MainLoop();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tk Optionmenu default value
by PodMaster (Abbot) on Jul 11, 2003 at 09:14 UTC | |
by Anonymous Monk on Jul 11, 2003 at 09:20 UTC |