Hi, I've written a piece of software that monitors the debug output of a
server via the use of wxProcess and wxExecute.
Whilst I have that part working fine, the only problem I'm left with is the
fact that the debug output gets appended into a textctrl when there is
output available. I know it doesn't *sound* like a problem, but I suppose
really it's more of a superficial thing. When the current vertical space of
the textctrl is filled up, instead of just scrolling down to a new line and
appending text, the whole textctrl seems to "jump" back to the top of the
textctrl like it had just cleared any other output and continues to append
text. However, if I then activate the scroll bar via the mousewheel or just
manually sliding the scrollbar, the previous text appears along with the new
text, and the scrollbars adjust themselves correctly.
So basically, it's like the textctrl is paginating, whereas I would like it
to behave more like a MSW command prompt window.
Really, there's not much to the code beyond what I have read as
conventional, but I'll provide a snip just to give you an idea:
---snip---
self.output = wxTextCtrl(self, -1, "", style =
wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL|wxTE_RICH|wxTE_RICH2)
...elsewhere...
def doProcess(self, *args):
try:
if self.process is not None:
text = self.process.read()
self.frame.output.SetDefaultStyle(wxTextAttr(self.frame.style.green))
self.frame.output.AppendText(text)
self.frame.output.Update() #does this help?
except JettyException, je:
self.frame.output.AppendText(je)
except AttributeError, ae:
self.frame.output.AppendText("Something has happened that should
not have happend. Stop breaking things.")
---snip---
Hope someone can point out the error of my ways.
Thanks
~Chris
Chris Ashurst
~Systems Production Support
~~Tower Hill Insurance Group
CONFIDENTIAL NOTICE: This email including any attachments, contains
confidential information belonging to the sender. It may also be
privileged or otherwise protected by work product immunity or other
legal rules. This information is intended only for the use of the
individual or entity named above. If you are not the intended
recipient, you are hereby notified that any disclosure, copying,
distribution or the taking of any action in reliance on the contents
of this emailed information is strictly prohibited. If you have
received this email in error, please immediately notify us by
reply email of the error and then delete this email immediately.