|
|
|||||||||||||||||||||||||||||
|
Using ChoicesThis example shows how to use Choices from Jython.
The complete source code for this example is included below. The init method first creates a Choice object and sets its callback for when a new item is selected. This callback is specified as the itemStateChanged event property. Then four items are added to the choice object and the rest of the layout is initialized. The change method is invoked whenever the selection in the choice object changes. It uses Python string formatting operator to display the current state to the user.
|