Mega Code Archive

 
Categories / Python Tutorial / Wxpython
 

Stand alone dialog

import wx 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()