This recipe will display a dialog box, showing a list of items, allowing the user to select one of them. The name of the selected item will be displayed via another dialog box.
Performing single selection from a list
How to do it...
In this recipe, we will be making use of the following methods:
- dialogCreateAlert(): This method is used to display a message via the dialog box
- dialogSetItems(): This method is used to define the array of items to be displayed in the list
- dialogGetResponse(): This method is used to get a response from the user
Take a look at the following steps:
- First type the following code in the Python script demoSingleSelection.py, in the current folder of your computer:
import...