wx.SingleChoiceDialog

Inheritance diagram for 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.

Properties Summary

Class API

Methods

__init__(parent, message, caption, choices=[], style=wx.CHOICEDLG_STYLE, pos=wx.DefaultPosition)

Constructor. Use 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


GetSelection()

Returns the index of selected item.


Returns:

int


GetStringSelection()

Returns the selected string.


Returns:

string


SetSelection(selection)

Sets the index of the initially selected item.

Parameters:

  • selection (int)

ShowModal()

Shows the dialog, returning one of wx.ID_OK or wx.ID_CANCEL.


Returns:

int


Properties

Selection
See GetSelection and SetSelection
StringSelection
See GetStringSelection