X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b1cfebd9f4fb3a63e4deab92c63f05b9706848a6..60178eb439b4624d6663a997b6a29d0e93b20f70:/wxPython/demo/wxListCtrl.py diff --git a/wxPython/demo/wxListCtrl.py b/wxPython/demo/wxListCtrl.py index a97cf24a3f..41645a29c3 100644 --- a/wxPython/demo/wxListCtrl.py +++ b/wxPython/demo/wxListCtrl.py @@ -1,4 +1,3 @@ -#!/bin/env python #---------------------------------------------------------------------------- # Name: ListCtrl.py # Purpose: Testing lots of stuff, controls, window types, etc. @@ -83,14 +82,14 @@ class TestListCtrlPanel(wxPanel, wxColumnSorterMixin): tID = wxNewId() self.il = wxImageList(16, 16) - bmp = images.getSmilesBitmap() - #idx1 = self.il.AddWithColourMask(bmp, wxWHITE) - idx1 = self.il.Add(bmp) - bmp = images.getSmallUpArrowBitmap() - self.sm_up = self.il.Add(bmp) - bmp = images.getSmallDnArrowBitmap() - self.sm_dn = self.il.Add(bmp) + idx1 = self.il.Add(images.getSmilesBitmap()) + self.sm_up = self.il.Add(images.getSmallUpArrowBitmap()) + self.sm_dn = self.il.Add(images.getSmallDnArrowBitmap()) + + #idx1 = self.il.AddIcon(wxIconFromXPMData(images.getSmilesData())) + #self.sm_up = self.il.AddIcon(wxIconFromXPMData(images.getSmallUpArrowData())) + #self.sm_dn = self.il.AddIcon(wxIconFromXPMData(images.getSmallDnArrowData())) self.list = wxListCtrl(self, tID, style=wxLC_REPORT|wxSUNKEN_BORDER)#|wxLC_VRULES|wxLC_HRULES) @@ -122,6 +121,7 @@ class TestListCtrlPanel(wxPanel, wxColumnSorterMixin): self.list.InsertColumnInfo(2, info) + items = musicdata.items() for x in range(len(items)): key, data = items[x] @@ -138,6 +138,7 @@ class TestListCtrlPanel(wxPanel, wxColumnSorterMixin): self.list.SetColumnWidth(0, wxLIST_AUTOSIZE) self.list.SetColumnWidth(1, wxLIST_AUTOSIZE) + self.list.SetColumnWidth(2, 100) # show how to select an item self.list.SetItemState(5, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED)