'wxListCtrl'에 해당되는 글 1건

  1. wx파이썬: wx.ListCtrl 2007/08/24

wx파이썬: wx.ListCtrl

Posted at 2007/08/24 17:44// Posted in wxPython/wxListCtrl
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()
이올린에 북마크하기(0) 이올린에 추천하기(0)
2007/08/24 17:44 2007/08/24 17:44