]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-13/list_smicon.py
4 class DemoFrame(wx
.Frame
):
6 wx
.Frame
.__init
__(self
, None, -1,
7 "wx.ListCtrl in wx.LC_SMALL_ICON 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,
18 style
=wx
.LC_SMALL_ICON
22 # assign the image list to it
23 self
.list.AssignImageList(il
, wx
.IMAGE_LIST_SMALL
)
25 # create some items for the list
28 self
.list.InsertImageStringItem(x
,
29 "This is item %02d" % x
,
32 app
= wx
.PySimpleApp()