Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How can I make the WebBrowser to scroll up when new content is inserted
How can I make the WebBrowser to scroll up when new content is inserted [message #533426] Thu, 13 May 2010 20:26 Go to next message
Florence  is currently offline Florence Friend
Messages: 16
Registered: July 2009
Junior Member
This is the UI requirement I need to achieve:
"Allow more entries to be displayed in the view: When the user clicks more, additional entries should be displayed in addition to the ones which are already displayed. The code should cause the UI to scroll such that the first entry of the "more" set is on top".


I would like to know how can I make the WebBrowser to scroll up when new content is inserted into the HTML page.

I am using I am using com.ibm.rcp.browser.service.WebBrowser which is similar to SWT Browser.

Thanks
Re: How can I make the WebBrowser to scroll up when new content is inserted [message #533551 is a reply to message #533426] Fri, 14 May 2010 14:05 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2151
Registered: July 2009
Senior Member
Hi,

Javascript's window object provides the methods below, so you probably need
to execute one of them via Browser.execute("window...."):

scroll(X,Y)
scrollBy(X, Y)
scrollTo(X,Y)

Grant


"Florence" <florencelu@yahoo.com> wrote in message
news:hshn9c$dr7$1@build.eclipse.org...
> This is the UI requirement I need to achieve:
> "Allow more entries to be displayed in the view: When the user clicks
more, additional entries should be displayed in addition to the ones which
are already displayed. The code should cause the UI to scroll such that the
first entry of the "more" set is on top".
>
>
> I would like to know how can I make the WebBrowser to scroll up when new
content is inserted into the HTML page.
>
> I am using I am using com.ibm.rcp.browser.service.WebBrowser which is
similar to SWT Browser.
>
> Thanks
>
Previous Topic:Launch an external application in a shell
Next Topic:Problem with SWT designer on Mac
Goto Forum:
  


Current Time: Wed Aug 21 12:02:00 GMT 2019

Powered by FUDForum. Page generated in 0.01871 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top