Hello,
I have an app with a wxTextCtrl on a panel, in a notebook. I can move
it from one page to another in the notebook.
I'm trying to move the same wxTextCtrl to a separate frame but it doesn't work.
The control stays on the frame that holds the notebook.
I realize the easy way would be to copy the text and create
a new control and fill it with that text, but the text has
color, so that approach won't work.
Here is a screenshot with the wxTextCtrl at bottom, working normally:
http://abeni.sf.net/log_good.png
Here is a screenshot of the frame where the wxTextControl should move to:
(As you can see it 'stays behind', but in the upper-left now.)
http://abeni.sf.net/log_bad.png
Here is the code:
def LogTab(self):
"""Show log in separate window"""
#self.log is the wxTextCtrl
win=panels.LogWindow(self, self.log)
win.Show(True)
self.log.Show(True)
class LogWindow(wxFrame):
def __init__(self, parent, log):
wxFrame.__init__(self, parent, -1, "Log")
panel = LogPanel(self, log)
class LogPanel(wxPanel):
def __init__(self, parent, log):
wxPanel.__init__(self, parent, -1)
s = wxBoxSizer(wxHORIZONTAL)
s.Add(log, 1, wxEXPAND)
self.SetSizer(s)
log.Show(True)
self.SetAutoLayout(True)
···
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963