Skip to main content


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:Treeviewer/-column, celleditor
Next Topic:[SOLVED] Installing the examples from p2 repository zip
Goto Forum:
  


Current Time: Wed Apr 24 19:06:35 GMT 2024

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

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

Back to the top