On May 7, 4:38 am, Bryan Oakley <
bryan.oak...@gmail.com> wrote:
> On Wed, May 5, 2010 at 6:07 PM, Nathaniel Echols
>
> <
nathaniel.ech...@gmail.com> wrote:
> > I use the TextCtrl to display log output from a long-running process, and
> > call AppendText() as needed to add new lines as my GUI receives them. A
> > senior colleague complained that this causes the control to jump to the end,
> > which makes it difficult to inspect a static section of text. Is there a
> > simple way to avoid this? (I think he's using a Mac, if it matters.)
> > thanks,
> > Nat
>
Nat,
i accidentally discovered a potential way to do this on windows, ymmv
for mac. I was trying to solve the problem of too much logging into a
"debug" window slowing down my app, so i tried freezing (rightly or
wrongly, probably wrongly) the parent of the text control, i.e.
self._dbg.GetParent().Freeze()
self._dbg.AppendText(msg)
self._dbg.GetParent().Thaw()
this had the unintended side effect of scroll bar no longer moving to
the end after the append is done. You may be able to kludge that
together with detecting the user moving the scroll bar or find some
other way using this info.
regards,
-jeff