in reply to Tk Optionmenu question
Your problem lies in that you don't want the Optionmenu itself scrolled -- you want the drop-down which it shows to be scrolled. Unfortunatly, what Tk thinks you're trying to do is the former. It's also not in your favor that Optionmenus drop down Menus -- which, if I'm remembering correctly, can't be scrolled in the first place.
Luckily, you're not the first person to want to have a large pop-up list. Look at the BrowseEntry widget, which is automatically scrolled.
Update: Here's some code which should do more of less what you want:
my $day_menu = $date_frame->BroseEntry( -state => "readonly", -choices => [(1..$days{$month} +)], -variable => \$day_number )->pack( -side=> "left" );
perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Tk Optionmenu question
by thor (Priest) on Jan 28, 2002 at 23:02 UTC | |
by Chmrr (Vicar) on Jan 29, 2002 at 00:09 UTC | |
by thor (Priest) on Jan 29, 2002 at 03:24 UTC |