import wx
class TestFrame(wx.Frame):
def __init__(self, parent, title):
wx.Frame.__init__(self, parent, -1, title, pos=(0, 0), size=(320, 240))
self.CentreOnScreen(wx.BOTH)
testListCtrl = wx.ListCtrl(self, -1, style = wx.LC_REPORT| wx.LC_SINGLE_SEL )
testListCtrl.InsertColumn(0, "label")
testListCtrl.SetColumnWidth(0, 120)
testListCtrl.InsertStringItem(0, "item0")
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(testListCtrl, 1, wx.EXPAND|wx.ALL, 5)
self.SetSizer(sizer)
class TestApp(wx.App):
def OnInit(self):
"OnInit"
frame = TestFrame(None, "TestApp")
frame.Show()
self.SetTopWindow(frame)
return True
def OnExit(self):
"OnExit"
pass
TestApp(redirect=False).MainLoop()


python 을 좋아하는 게임 프로그래머