]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-13/list_list.py
   4 class DemoFrame(wx
.Frame
): 
   6         wx
.Frame
.__init
__(self
, None, -1, 
   7                           "wx.ListCtrl in wx.LC_LIST mode", 
  10         # load some images into an image list 
  11         il 
= wx
.ImageList(16,16, True) 
  12         for name 
in glob
.glob("smicon??.png"): 
  13             bmp 
= wx
.Bitmap(name
, wx
.BITMAP_TYPE_PNG
) 
  16         # create the list control 
  17         self
.list = wx
.ListCtrl(self
, -1, style
=wx
.LC_LIST
) 
  19         # assign the image list to it 
  20         self
.list.AssignImageList(il
, wx
.IMAGE_LIST_SMALL
) 
  22         # create some items for the list 
  25             self
.list.InsertImageStringItem(x
, 
  26                                             "This is item %02d" % x
, 
  31 app 
= wx
.PySimpleApp()