+ self.tmpchi = None
+
+ #adding some art
+ self.il = wx.ImageList(16, 16)
+ a={"sm_up":"GO_UP","sm_dn":"GO_DOWN","w_idx":"WARNING","e_idx":"ERROR","i_idx":"QUESTION"}
+ for k,v in a.items():
+ s="self.%s= self.il.Add(wx.ArtProvider_GetBitmap(wx.ART_%s,wx.ART_TOOLBAR,(16,16)))" % (k,v)
+ exec(s)
+ self.SetImageList(self.il, wx.IMAGE_LIST_SMALL)
+
+ #adding some attributes (colourful background for each item rows)
+ self.attr1 = wx.ListItemAttr()
+ self.attr1.SetBackgroundColour((220, 220, 220))
+ self.attrsg = wx.ListItemAttr()
+ self.attrsg.SetBackgroundColour((230, 230, 230))
+ self.attr2 = wx.ListItemAttr()
+ self.attr2.SetBackgroundColour((190, 249, 236))
+ self.attr2s = wx.ListItemAttr()
+ self.attr2s.SetBackgroundColour((211, 252, 244))
+ self.attr3 = wx.ListItemAttr()
+ self.attr3.SetBackgroundColour((245, 180, 180))
+ self.attr3s = wx.ListItemAttr()
+ self.attr3s.SetBackgroundColour((245, 190, 190))
+
+
+ self.InsertColumn(0, "num", wx.LIST_FORMAT_RIGHT)
+ self.InsertColumn(1, "eff. s.t.", wx.LIST_FORMAT_RIGHT)
+ self.InsertColumn(2, "eff. total", wx.LIST_FORMAT_RIGHT)
+ self.InsertColumn(3, "pourcentage", wx.LIST_FORMAT_RIGHT)
+ self.InsertColumn(4, "chi2", wx.LIST_FORMAT_RIGHT)
+ self.InsertColumn(5, "Type", wx.LIST_FORMAT_RIGHT)
+ self.InsertColumn(6, "forme", wx.LIST_FORMAT_RIGHT)
+ self.InsertColumn(7, "p", wx.LIST_FORMAT_RIGHT)
+
+
+ self.SetColumnWidth(0, 60)
+ self.SetColumnWidth(1, 70)
+ self.SetColumnWidth(2, 80)
+ self.SetColumnWidth(3, 100)
+ self.SetColumnWidth(4, 70)
+ self.SetColumnWidth(5, 60)
+ self.SetColumnWidth(6, 140)
+ self.SetColumnWidth(7, wx.LIST_AUTOSIZE)
+
+ #These two should probably be passed to init more cleanly
+ #setting the numbers of items = number of elements in the dictionary
+ self.itemDataMap = dictdata
+ self.itemIndexMap = dictdata.keys()
+ self.SetItemCount(len(dictdata))