import wx import wx.lib.dialogs #--------------------------------------------------------------------------- def runTest(frame, nb, log): lst = [ 'apple', 'pear', 'banana', 'coconut', 'orange', 'etc', 'etc..', 'etc...' ] dlg = wx.lib.dialogs.MultipleChoiceDialog( frame, "Pick some from\n this list\nblah blah...", "m.s.d.", lst) if (dlg.ShowModal() == wx.ID_OK): print "Selection:", dlg.GetValue(), " -> ", dlg.GetValueString() #--------------------------------------------------------------------------- overview = """\ This is a Python implementation of a dialog that is not yet implemented in wxWindows proper, so don't let the wxWindows documentation mislead you.

MultipleChoiceDialog(self, parent, msg, title, lst, pos = wx.wxDefaultPosition, size = (200,200), style = wx.DEFAULT_DIALOG_STYLE)

parent
The parent window
msg
The message that will be displayed above the list
title
The text that will appear on the title bar
lst
A Python list of choices that will appear in the dialog.
pos
The position of the dialog
size
The size of the dialog
style
The style for the dialog. Only styles normally available to wxDialog are available.
Methods
GetValue
Returns a tuple containing the indices of the selected items
GetValueString
Returns a tuple containing the text of the selected items
Additionally, MultipleChoiceDialog.lbox is a standard wx.ListBox which supports all methods applicable to that class. """ if __name__ == '__main__': import sys,os import run run.main(['', os.path.basename(sys.argv[0])])