This class represents a dialog that shows a list of strings, and allows the user to select one.
Double-clicking on a list item is equivalent to single-clicking and then pressing OK.
This class supports the following styles:
See also
__init__ | Constructor, taking an array of String choices and optional client data. |
GetSelection | Returns the index of selected item. |
GetStringSelection | Returns the selected string. |
SetSelection | Sets the index of the initially selected item. |
ShowModal | Shows the dialog, returning either ID_OK or ID_CANCEL. |
Selection | See GetSelection and SetSelection |
StringSelection | See GetStringSelection |
This class represents a dialog that shows a list of strings, and allows the user to select one.
Possible constructors:
PySingleChoiceDialog(parent, message, caption, choices,
style=CHOICEDLG_STYLE, pos=DefaultPosition)
Constructor, taking an array of String choices and optional client data.
Parameters: |
|
---|
An array of client data to be associated with the items. See GetSelectionData .
Note
Use ShowModal to show the dialog.
Returns the index of selected item.
Return type: | int |
---|
Returns the selected string.
Return type: | string |
---|
Sets the index of the initially selected item.
Parameters: | selection (int) – |
---|
Shows the dialog, returning either ID_OK or ID_CANCEL.
Return type: | int |
---|
See GetSelection and SetSelection