choice.py

来自「wxPython的基本示例程序」· Python 代码 · 共 17 行

PY
17
字号
import wxclass ChoiceFrame(wx.Frame):    def __init__(self):        wx.Frame.__init__(self, None, -1, 'Choice Example',                 size=(250, 200))        panel = wx.Panel(self, -1)        sampleList = ['zero', 'one', 'two', 'three', 'four', 'five',                      'six', 'seven', 'eight']        wx.StaticText(panel, -1, "Select one:", (15, 20))        wx.Choice(panel, -1, (85, 18), choices=sampleList)if __name__ == '__main__':    app = wx.PySimpleApp()    ChoiceFrame().Show()    app.MainLoop() 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?