mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
Modified Treebook and Toolbook to use next(imageIdGenerator) rather than imageIdGenerator.next()
This commit is contained in:
@@ -19,8 +19,8 @@ def getNextImageID(count):
|
||||
imID += 1
|
||||
if imID == count:
|
||||
imID = 0
|
||||
|
||||
|
||||
|
||||
|
||||
class TestTB(wx.Toolbook):
|
||||
def __init__(self, parent, id, log):
|
||||
wx.Toolbook.__init__(self, parent, id, style=
|
||||
@@ -40,12 +40,12 @@ class TestTB(wx.Toolbook):
|
||||
il.Add(bmp)
|
||||
self.AssignImageList(il)
|
||||
imageIdGenerator = getNextImageID(il.GetImageCount())
|
||||
|
||||
|
||||
# Now make a bunch of panels for the list book
|
||||
first = True
|
||||
for colour in colourList:
|
||||
win = self.makeColorPanel(colour)
|
||||
self.AddPage(win, colour, imageId=imageIdGenerator.next())
|
||||
self.AddPage(win, colour, imageId=next(imageIdGenerator))
|
||||
if first:
|
||||
st = wx.StaticText(win.win, -1,
|
||||
"You can put nearly any type of window here,\n"
|
||||
|
||||
@@ -45,7 +45,7 @@ class TestTB(wx.Treebook):
|
||||
first = True
|
||||
for colour in colourList:
|
||||
win = self.makeColorPanel(colour)
|
||||
self.AddPage(win, colour, imageId=imageIdGenerator.next())
|
||||
self.AddPage(win, colour, imageId=next(imageIdGenerator))
|
||||
if first:
|
||||
st = wx.StaticText(win.win, -1,
|
||||
"You can put nearly any type of window here,\n"
|
||||
@@ -56,7 +56,7 @@ class TestTB(wx.Treebook):
|
||||
|
||||
win = self.makeColorPanel(colour)
|
||||
st = wx.StaticText(win.win, -1, "this is a sub-page", (10,10))
|
||||
self.AddSubPage(win, 'a sub-page', imageId=imageIdGenerator.next())
|
||||
self.AddSubPage(win, 'a sub-page', imageId=next(imageIdGenerator))
|
||||
|
||||
self.Bind(wx.EVT_TREEBOOK_PAGE_CHANGED, self.OnPageChanged)
|
||||
self.Bind(wx.EVT_TREEBOOK_PAGE_CHANGING, self.OnPageChanging)
|
||||
|
||||
Reference in New Issue
Block a user