Where do you draw the line when supporting attributes? We could
support all given attributes for each element, but I think that lends
itself to being an incredible headache.

You can currently do this with attrs:

widgets.SelectField(options=options_b,
                            attrs={"multiple":"True", "size":"10"},
                            name="Multiple",
                            default=["val3","val4"])

On 19 Dec 2005 18:11:26 -0200, Jorge Godoy <[EMAIL PROTECTED]> wrote:
>
> Jared Kuolt <[EMAIL PROTECTED]> writes:
>
> > On 19 Dec 2005 16:32:58 -0200, Jorge Godoy <[EMAIL PROTECTED]> wrote:
> > > How about an additional option to say how many visible options there will 
> > > be
> > > at once?  Something to tell the number of rows the "listbox" will use.
> >
> > I'm not sure I understand what you mean. Can you give an example?
>
> There are two "presentational" options to SELECT: one that looks like a combo
> box in a GUI and another that looks like a list box in a GUI.  One shows one
> option at a time and when clicked opens a kind of 'drop down' list of options
> that allows selecting options.  The other presents 'n' options at once and has
> scrollbars when there are more options than the ones shown on screen.  Their
> equivalent Kid template is:
>
> (combo box)
>
> <select id="client" name="client">
>   <option py:for="client_id, client in clients"
>       py:attrs="value=client_id"
>   >${client}</option>
> </select>
>
> (list box)
>
> <select id="gavailable" name="availableGroups" multiple="True" size="10">
>   <option py:for="group_id, group in groups" py:attrs="value=grupo_id"
>   >${group}</option>
> </select>
>
>
>
> I.e. their difference is the "size" attribute at the 'select' element
> specifying how many options should be shown at once.
>
>
> Be seeing you,
> --
> Jorge Godoy      <[EMAIL PROTECTED]>
>


--
[EMAIL PROTECTED]

Reply via email to