in reply to Re: Re: CGI form element sizing issue
in thread CGI form element sizing issue

No, I said the labels - the values are not affected.
$q->scrolling_list(-name =>'list_name', -values =>['eenie','meenie','minie','moe'], -default=>['eenie','moe'], -size =>1, -labels => { eenie => ' eenie ', meenie => ' meenie ', + minie => ' minie ', mo => ' mo ' } );

cLive ;-)

Replies are listed 'Best First'.
Re: Re: CGI form element sizing issue
by sulfericacid (Deacon) on Apr 05, 2003 at 12:03 UTC
    The user asked for a popup_menu enlarger, your's is for a scrolling_list. I actually tried your code under a popup_menu but the size of the line still stays the same. (confusing question you have here, Anonymous Monk)

    "Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

    sulfericacid
      On cpan I found what they might be looking for:
      %labels = ('eenie'=>'your first choice', 'meenie'=>'your second choice', 'minie'=>'your third choice'); print $query->popup_menu('menu_name', ['eenie','meenie','minie'], 'meenie',\%labels);
      Which is essentially what you have. I removed the actual text and attempted to add spaces (to see if you can change the length of the line) and you can't. All spaces in the labels are removed leaving the longest line the length of the longest text label. For fun I tried   but that shows up as text instead of as a space.

      Anyway, these are my findings..

      "Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

      sulfericacid

      'popup_menu' and 'scrolling_list' with -size=1 are synonymous in CGI.pm - both create <select> tags. God knows why Lincoln let that slip through though...

      In my initial post, I mentioned you may need &nbsp; chars. Try again using:

      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eenie&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      It works

      cLive ;-)