hi,
i'm trying to follow the demo of the treebook. i'm stuck on this code:
for colour in colourList:
win = self.makeColorPanel(colour)
self.AddPage(win, colour, imageId=imageIdGenerator.next())
[snip]
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())
it seems to me that the calls to AddPage and AddSubPage both pass in
the same window as their first parameter. why is it so? how does
treebook know that the statictext belongs to another window?
ta, jack
The second call to self.makeColorPanel creates a new win(dow). This
new color panel (with StaticText on it) is added as sub page.
Cheers, Frank
···
2007/2/14, Jack Andrews <effbiae@gmail.com>:
hi,
i'm trying to follow the demo of the treebook. i'm stuck on this code:
for colour in colourList:
win = self.makeColorPanel(colour)
self.AddPage(win, colour, imageId=imageIdGenerator.next())
[snip]
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())
it seems to me that the calls to AddPage and AddSubPage both pass in
the same window as their first parameter. why is it so? how does
treebook know that the statictext belongs to another window?