Hi Alec,
Please keep this on the list, others may benefit and the conversation will be archived.
Thanks for the tip. I’m still wrapping my head around the concepts,
and am having trouble applying your code. Here’s my main loop:
if name == ‘main’:
app = model.Application(MyBackground)
app.MainLoop()
And I’m launching a child window like this:
self.viewerWindow = model.childWindow(self, collage_viewer.Minimal)
When I print self.viewerWindow (which is the window I’m trying to
affect), I get:
<collage_viewer.Minimal; proxy of C++ wxFrame instance at _58cfbc01_p_wxFrame>
Given that, do you see any way to apply properties to viewerWindow?
I’m not sure what happens in your code. Here’s what I’d do: override MyFrame.init, take out your own arguments and do with them what you need to do and pass the remaining arguments on the wx.Frame.init, like this:
class MyFrame(wx.Frame):
def init(self, myArg, *args, **kwargs):
super(MyFrame, self).init(*args, **kwargs)
# do whatever you need to do with myArg
Instantiate like this:
myFrame = MyFrame(myArg, None, style=wx.DEFAULT_FRAME_STYLE&
~wxCAPTION)
None (wx.Frame.init has one mandatory argument, the parent frame) and style are passed to wx.Frame.init by means of the args and kwargs.
You may want to (re)read http://docs.python.org/tut/node6.html#SECTION006700000000000000000
Cheers, Frank
···
2007/1/20, Alec Bennett <wrybread@gmail.com >: