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

Only problem I see with that is if you add spaces to the value to line them up then when you print out the params there will be lots of spaces at the end.

"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

Replies are listed 'Best First'.
Re: CGI form element sizing issue
by cLive ;-) (Prior) on Apr 04, 2003 at 22:56 UTC
    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 ;-)

      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 ;-)