You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Todd Volkert <tv...@gmail.com> on 2010/05/27 21:42:47 UTC

Re: ScrollPane question

Hi Patrick,

I hope you were able to solve this, but in case you weren't, better late
than never (I was out of commission for a month and a half) :-)

There are two ways you could go with this:

1) Prepend the text to the text area, thus sidestepping the problem...

2) Manually scroll the scroll pane to the bottom after new text is added to
the text area.  The trick here is that immediately after the text has been
added, the text area has not yet been validated and thus is as big as it
needs to be (nor is the scroll pane's scrollable area).  This means that you
have to queue a callback (using ApplicationContext.queueCallback(Runnable))
to perform the scrolling (manually calling scrollPane.setScrollTop(...)).

Cheers,
-T

On Fri, Apr 23, 2010 at 1:38 PM, Patrick Shea <pa...@ps1.net> wrote:

> Hi, I'm trying to redirect system out to a textarea withing a scollpane. I
> got the textarea to fill with the System.out text but the ScrollPane is not
> scrolling with the last entry and is always staying at the beginning of the
> textarea.
>
> Is there a way to force the scrollpane to scroll to the bottom?
>
> Thanks
> Patrick
>
>