window reflecting one of three modes

Atte André Jensen atte.jensen at gmail.com
Fri May 11 23:48:20 PDT 2007


Hi

I'm quite new to wxpython, so please be gentle if I'm being stupid :-)

My application can be in one of three "modes". I have a window called
current_view that should display some information based on which mode
the app is in. Right now it's just a dummy defined as (main_content is
another SplitterWindow):

self.current_view = wx.SplitterWindow(main_content)
self.main_view = wx.Panel(self.current_view)
self.detail_view = wx.Panel(self.current_view)
self.detail_view.SetBackgroundColour(wx.WHITE)

If the application switches mode, I need to have current_view reflect
this. Is it possible to have three "versions" of current_view around and
then when the mode changes simply which "version" is actually displayed?
Or should I rather use creator functions or classes that rebuild the
current_view when the mode changes?

My problem is mainly that I don't know if it's possible (and if so, how)
to create for instance current_view_modeA without supplying a parent.
And if I simply create the three versions all with parent main_content I
get strange things (a small white square) in the display.

I hope the question is somehow clear...

Thanks in advance for any response.

-- 
peace, love & harmony
Atte

http://atte.dk       | http://myspace.com/attejensen
http://anagrammer.dk | http://atte.dk/compositions





More information about the wxpython-users mailing list