#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# generated by wxGlade 0.4.1 on Sat Sep 29 21:06:44 2007

import wx

class MyFrame(wx.Frame):
    def __init__(self, *args, **kwds):
        # begin wxGlade: MyFrame.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.list_ctrl_1 = wx.ListCtrl(self, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER)

        self.__set_properties()
        self.__do_layout()
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: MyFrame.__set_properties
        self.SetTitle("Test Image List")
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: MyFrame.__do_layout
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        sizer_1.Add(self.list_ctrl_1, 1, wx.EXPAND, 0)
        self.SetAutoLayout(True)
        self.SetSizer(sizer_1)
        sizer_1.Fit(self)
        sizer_1.SetSizeHints(self)
        self.Layout()
        # end wxGlade

# end of class MyFrame

if (__name__ == "__main__"):
    app = wx.PySimpleApp()
    frame = MyFrame(None, -1, "Test Image List")
    
    # Okay, make the image list and add the one image...
    il = wx.ImageList(120, 120)
    img = wx.Image ("myself.png")
    a = il.Add (wx.BitmapFromImage (img))
    frame.list_ctrl_1.SetImageList (il, wx.IMAGE_LIST_NORMAL)
    
    frame.Show(True)
    app.MainLoop()

