********************* wx.SingleChoiceDialog ********************* Inheritance diagram for `wx.SingleChoiceDialog`: | .. inheritance-diagram:: wx.SingleChoiceDialog | Description =========== 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``. .. seealso:: `wx.MultiChoiceDialog `_ Derived From ^^^^^^^^^^^^^ * `wx.Dialog `_ * `wx.Window `_ * `wx.EvtHandler `_ * `wx.Object `_ Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `GetSelection <#GetSelection>`_ * `GetStringSelection <#GetStringSelection>`_ * `SetSelection <#SetSelection>`_ * `ShowModal <#ShowModal>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `Selection <#Selection>`_ * `StringSelection <#StringSelection>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__(parent, message, caption, choices=[], style=wx.CHOICEDLG_STYLE, pos=wx.DefaultPosition) Constructor. Use `ShowModal <#ShowModal>`_ method to show the dialog. **Parameters:** * `parent` (`wx.Window `_) * `message` (string) * `caption` (string) * `choices` (list of strings) * `style` (long) * `pos` (`wx.Point `_) | **Returns:** `wx.SingleChoiceDialog `_ -------- .. method:: GetSelection() Returns the index of selected item. | **Returns:** `int` -------- .. method:: GetStringSelection() Returns the selected string. | **Returns:** `string` -------- .. method:: SetSelection(selection) Sets the index of the initially selected item. **Parameters:** * `selection` (int) -------- .. method:: ShowModal() Shows the dialog, returning one of ``wx.ID_OK`` or ``wx.ID_CANCEL``. | **Returns:** `int` -------- Properties ^^^^^^^^^^ .. attribute:: Selection See `GetSelection <#GetSelection>`_ and `SetSelection <#SetSelection>`_ .. attribute:: StringSelection See `GetStringSelection <#GetStringSelection>`_