def addImageTile(self, evt, fname):
self.scrollCount += 1
tile = makeTile(fname, self.scrollPanel, self.scrollCount)
tile.Bind(wx.EVT_RIGHT_DOWN,
lambda evt,
self.delete(evt,tmp))
self.scrollSizer.Add(tile, 0, wx.ALL, .5)
self.setUpScroll()
self.bottom(evt)
def delete(self, evt, tmp):
p = self.scrollList.index(tmp[0])
self.scrollSizer.Hide(p)
self.scrollSizer.Remove(p)
self.scrollCount -= 1
del self.scrollList[p]
self.setUpScroll()
def setUpScroll(self):
self.scrollPanel.SetupScrolling(
scroll_x=False, scroll_y=True,
rate_x=0, rate_y=4,
scrollToTop=False, scrollIntoView=True)