]> git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-09/choice_box.py
don't use strlen() to verify the length of the string as it can contain embedded...
[wxWidgets.git] / wxPython / samples / wxPIA_book / Chapter-09 / choice_box.py
1 import wx
2
3 if __name__ == "__main__":
4 app = wx.PySimpleApp()
5 choices = ["Alpha", "Baker", "Charlie", "Delta"]
6 dialog = wx.SingleChoiceDialog(None, "Pick A Word", "Choices",
7 choices)
8 if dialog.ShowModal() == wx.ID_OK:
9 print "You selected: %s\n" % dialog.GetStringSelection()
10
11 dialog.Destroy()
12