A list box : ListBox « wxPython « Python Tutorial






A list box
import wx

class ListBoxFrame(wx.Frame):
    def __init__(self):
        wx.Frame.__init__(self, None, -1, 'List Box Example',size=(250, 200))
        panel = wx.Panel(self, -1)

        sampleList = ['0', '1', '2', '3', '4']

        listBox = wx.ListBox(panel, -1, (20, 20), (80, 120), sampleList, wx.LB_SINGLE)
        listBox.SetSelection(3)
                
app = wx.PySimpleApp()
ListBoxFrame().Show()
app.MainLoop()








19.24.ListBox
19.24.1.A list boxA list box