[wxPython-users] Re: text logging widget?

Tom Plunket python at fancy.org
Fri Dec 8 14:31:41 PST 2006


Don Dwiggins wrote:

> Take a look at the logging window at the bottom of the wx demo app...

I'm doing virtually the same thing but I too have unsatisfactory
behavior of the TextCtrl; I write a lot of stuff to it (it's a log for a
build process), and the text frequently disappears altogether, and the
location to which the window scrolls seems fairly arbitrary.  Clicking
on the scrollbar "fixes" the view temporarily, but it's intended to be
an automated process that you can just look at (i.e. the requirement to
click on it is highly undesirable).

I'm creating mine with

style = wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_RICH2 | wx.TE_DONTWRAP

The demo log window doesn't define RICH2, and the PythonEvents log
window doesn't define DONTWRAP aka HSCROLL.  So I've got the union of
the two...

I'm thinking I may need to periodically reset the cursor position or
something, but started working on something else for the time being.

> also, in the Process and Events/KeyEvents section, there's a ListCtrl 
> used for logging.

That's interesting to be sure, although I'm just hooking the build's
stdout and stderr (each to a different log window) so I'd just like to
get a Plain Ol' Box Which Displays Text.  :)

thx,
-tom!

-- 




More information about the wxpython-users mailing list