in reply to Scrolling Lists
Update: You wanted to use CGI.pm? Ok, this time we'll use a fixed width of 40 chars:my @values = qw/ One Two Three Four Zoobdude(_Been_to_Dennys?_:) /; my $longest = 0; map { $longest = length > $longest ? length : $longest } @values; printf "<option value='$_'>%${longest}s\n", $_ foreach @values;
Enjoy!my @values = qw/ One Two Three Four Zoobdude(_Been_to_Dennys?_:) /; my %popup; $popup{$_} = sprintf "%40s",$_ foreach @values; print $cgi->popup_menu( -name => 'popup', '-value' => [ keys %popup ], '-labels' => \%popup, ),"\n";
-- Casey
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Scrolling Lists
by drujax (Initiate) on Jul 20, 2000 at 23:23 UTC | |
by cwest (Friar) on Jul 20, 2000 at 23:25 UTC |