wxpython 2.7 列表选择窗口 SingleChoiceDialog

#!/usr/bin/env python
#-*-coding:UTF-8 -*-

import wx

if __name__=='__main__':
    app=wx.PySimpleApp()
    frame=wx.SingleChoiceDialog(None,
                                'What version of Python are you using?',
                                'Single Choice',
                                ['2.7.15','3.7.0','我不玩了'])
    if frame.ShowModal()==wx.ID_OK:
        response=frame.GetStringSelection()
        print response
    app.MainLoop()

wxpython 2.7 列表选择窗口 SingleChoiceDialog_第1张图片

你可能感兴趣的:(wxpython 2.7 列表选择窗口 SingleChoiceDialog)