Re: Scrolling to bottom of TextView?




On Jan 10, 2005, at 2:08 PM, Martin Junius wrote:

This uses an otherwise superfluous mark for the scrolling.
Is this the canonical way or is there an easier way to achieve this (without the mark)?

when i've done this in the past, i've used a named mark with right gravity, so that it's always at the end. no need to keep recreating it.

aristotle's idea may be better.


you could do something like this, even:

on the buffer's 'changed' or 'inserted' or whatever signal fires when text is inserted, install an idle that will scroll to the bottom; if the idle is already installed, do nothing.
then, just insert text normally.
the idea is that it will scroll lazily, hopefully reducing load and the potential for not scrolling far enough.

no idea if that will actually work, just brainstorming.

--
That's it! It's one thing for a ghost to scare my children, but it's another to play my theremin!
  - Homer Simpson




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]