Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Auto scroll contents of SWT Browser(How can I automatically scroll down the contents of a Bowser?)
icon9.gif  Auto scroll contents of SWT Browser [message #549762] Tue, 27 July 2010 20:46 Go to next message
Milton  is currently offline Milton Friend
Messages: 10
Registered: October 2009
Junior Member
Hello,

I am creating an application that requires an HTML report to be generated. I am using a SWT Browser to display the report and I need to auto scroll down as the report is filled.

I know that using getVerticalBar() will not work because the browser is nothing more than a embedded IE using OLE.

Is there any way to do this?

Thanks a lot,
Milton.
icon14.gif  Re: Auto scroll contents of SWT Browser [message #549929 is a reply to message #549762] Wed, 28 July 2010 13:47 Go to previous message
Milton  is currently offline Milton Friend
Messages: 10
Registered: October 2009
Junior Member
I posted this question in another project by mistake but I already got a reply. This is the link in case you are interested:

http://www.eclipse.org/forums/index.php?t=msg&goto=54992 7&#msg_549927

Basically you do this:

browser.addLocationListener(new LocationAdapter()
{
    public void changed(LocationEvent event)
     {
        browser.execute("window.scrollTo(0, document.body.scrollHeight)");
     }
}
Previous Topic:[SOLVED] Installing the examples from p2 repository zip
Next Topic:Preventing TreeItem to expand/collapse
Goto Forum:
  


Current Time: Mon Oct 23 21:04:26 GMT 2017

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

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