Short description

For very long lists it would be nice to have the possibility to use in a form scroll bars

   1 --- web.py.orig	2006-02-04 01:18:30.065466984 +0100
   2 +++ web.py	2006-02-04 01:18:36.948420616 +0100
   3 @@ -51,7 +51,7 @@
   4  
   5      return request.theme.make_icon(icon)
   6  
   7 -def makeSelection(name, values, selectedval=None):
   8 +def makeSelection(name, values, selectedval=None, size="1"):
   9      """ Make a HTML <select> element named `name` from a value list.
  10          The list can either be a list of strings, or a list of
  11          (value, label) tuples.
  12 @@ -59,7 +59,7 @@
  13          `selectedval` is the value that should be pre-selected.
  14      """
  15      from MoinMoin.widget import html
  16 -    result = html.SELECT(name=name)
  17 +    result = html.SELECT(name=name, size="%s" % size)
  18      for val in values:
  19          if not isinstance(val, type(())):
  20              val = (val, val)

web.py.patch

size="1" defines on default pulldown list any greater gives a scrollbar


CategoryFeatureRequest

MoinMoin: FeatureRequests/ScrollBarLists (last edited 2007-10-29 19:06:25 by localhost)