Choice

A java-style choice control: a drop down list.

Base Classes

Methods

__init__(self, parent, contents, default)

   def __init__(self, 
                parent, 
                contents = [], 
                default = None
                ):

Constructor. Contents

addChoice(self, choice)

   def addChoice(self, choice):

Adds a new choice to the list (choice is a string).

get(self)

   def get(self):

Gets the currently active selection.

setSelection(self, selection)

   def setSelection(self, selection):

Sets the selection to that given. Does not verify that selection is a valid choice.