Previous Next blank.gif blank.gif

Class Select - Used to define a list widget or option widget.


SYNOPSIS

import HTMLgen
class Select(UserList)
  def __init__(self, data=None, **kw)
  string __module__ = 'HTMLgen'
  def __str__(self)

  # Methods inherited by Select from UserList
  def __add__(self, list)
  def __cmp__(self, list)
  def __delitem__(self, i)
  def __delslice__(self, i, j)
  def __getitem__(self, i)
  def __getslice__(self, i, j)
  def __len__(self)
  def __mul__(self, n)
  def __mul__(self, n)
  def __radd__(self, list)
  def __repr__(self)
  def __setitem__(self, i, item)
  def __setslice__(self, i, j, list)
  def append(self, item)
  def count(self, item)
  def index(self, item)
  def insert(self, i, item)
  def pop(self, i=-1)
  def remove(self, item)
  def reverse(self)
  def sort(self, *args)

DESCRIPTION

Pass a list of strings to show a list with those values. Alternatively can pass a list of tuple pairs. Each pair contains the displayed string and it's associatated value mapping. If no value mapping is needed just use something that evaluates to None.

Keyword Arguments:

name
provides the datum name
size
the visual size. 1 means use an option popup widget. >=2 means use a list widget with that many lines.
multiple
flag to indicate whether multiple selections are supported.
selected
list of values to be shown as pre-selected.
onBlur
script, which is executed, when the field loses focus
onChange
script, which is executed, when the field value changed
onFocus
script, which is executed, when the field receives focus

SEE ALSO

HTMLgen

UserList


Previous Next blank.gif blank.gif
Buzz.gif

Copyright © Robin Friedrich
All Rights Reserved
Comments to author: friedrich@pythonpros.com
Generated: Tue Apr 20, 1999