wxWidgets/wxPython/samples/wxPIA_book/Chapter-09/choice_box.py
2006-11-01 22:36:23 +00:00

13 lines
337 B
Python

import wx
if __name__ == "__main__":
app = wx.PySimpleApp()
choices = ["Alpha", "Baker", "Charlie", "Delta"]
dialog = wx.SingleChoiceDialog(None, "Pick A Word", "Choices",
choices)
if dialog.ShowModal() == wx.ID_OK:
print "You selected: %s\n" % dialog.GetStringSelection()
dialog.Destroy()