Stand alone dialog : SingleChoiceDialog « wxPython « Python Tutorial






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








19.34.SingleChoiceDialog
19.34.1.Use SingleChoiceDialog
19.34.2.Stand alone dialogStand alone dialog