Thanks much I'll have a look at that example in more detail to see if
I can make that work for what I need to do.
My case is sort of the reverse of that...in that by default the scroll
is at the bottom...new messages go to the bottom of the list...so it's
like a 'tail' viewer always watching the latest messages. So I need
to remove the old messages and only show them if they scroll up to see
them.
I have something partly working...I remove old DOM elements after a
certain point and then put them back when they scroll to the top. But
I have two problems to resolve:
1. The scrollbar 'looks' wrong because since I take out old messages
the scrollbar thinks the client height is always small so the
scrollbar thumb is way too big and doesn't reflect the large content
the client really can have.
2. Because of #1 I don't have a good way to tell the user there are
more old messages that could be added to the view...currently I just
re-add 10 old messages every time they scroll to the top but that
needs improvement.
It's like I really need a virtual scrollbar that I position and
control is size and position based on the actual message content I
have vs. what the HTML widget is currently showing.
Regarding performance, I think I do need to implement this because I'm
seeing very bad memory usage with thousands of DOM nodes...power
considerations don't matter much to me...as this will be run in
desktop browser.
Thanks,
-Dave
On Aug 14, 9:16 am, Jens <
jens.nehlme...@gmail.com> wrote:
> You don't have to know how tall each HTML portion is. You just need to know
> when to load the next page of data and that would be if your scroll
> position nearly reaches the bottom of ScrollPanel.
>
> Its pretty similar to what you can see here (see ShowMorePagerPanel.java):
http://gwt.google.com/samples/Showcase/Showcase.html?locale=en#!CwCel...