Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Browser widget scroll position
Browser widget scroll position [message #448623] Wed, 12 January 2005 14:17 Go to next message
Rainer is currently offline RainerFriend
Messages: 21
Registered: July 2009
Junior Member
I'm trying to access the scrollbar position of the browser widget using
the following code:

browser.getVerticalBar().getSelection();

However, this results in a NullPointer exception, since the browser widget
always returns null for the scrollbar... Is there any way around this?

Thanks in advance,
-Ray
Re: Browser widget scroll position [message #448634 is a reply to message #448623] Wed, 12 January 2005 16:15 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Not that I know of. It's not possible to reach inside a browser and get the
scroll bar.

"Rainer" <rainer.simon@gmx.at> wrote in message
news:cs3bic$s47$1@www.eclipse.org...
> I'm trying to access the scrollbar position of the browser widget using
> the following code:
>
> browser.getVerticalBar().getSelection();
>
> However, this results in a NullPointer exception, since the browser widget
> always returns null for the scrollbar... Is there any way around this?
>
> Thanks in advance,
> -Ray
>
Re: Browser widget scroll position [message #448650 is a reply to message #448623] Wed, 12 January 2005 20:04 Go to previous message
Christophe Cornu is currently offline Christophe CornuFriend
Messages: 304
Registered: July 2009
Senior Member
Hi Ray,
The underlying native HTML engine manages its own scrollbars - the document
could be nested, have multiple frames and scrollbars, scrollbars can
appear/disappear as document is loaded or modified etc.
It depends on what your application is trying to do. You can do what web
developers do: e.g. use javascript window.scrollTo to change the position,
as described in an earlier post "Browser widget - howto scroll to end".

Chris
Previous Topic:Browser widget - howto scroll to end
Next Topic:testing...
Goto Forum:
  


Current Time: Thu Sep 19 23:26:03 GMT 2024

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

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

Back to the top