Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT Browser Scrollbar(Scrollbar disappears)
SWT Browser Scrollbar [message #633462] Mon, 18 October 2010 06:45 Go to next message
No real name is currently offline No real name
Messages: 1
Registered: October 2010
Junior Member
When I resize my swt browser, the scroll bar comes with it disappears, does anyone know why?

Here is my code:

shell.addListener(SWT.Resize, new Listener() {
public void handleEvent(Event e) {
browser.setSize(shell.getSize().x, shell.getSize().y);
}
});
Re: SWT Browser Scrollbar [message #633608 is a reply to message #633462] Mon, 18 October 2010 14:31 Go to previous message
Grant Gayed is currently offline Grant Gayed
Messages: 2151
Registered: July 2009
Senior Member
Hi,

Browser scrollbars are handled by the embedded browser control, including
showing/hiding them as needed. I assume that the new size is not large
enough to show the full content, so the scrollbars are definitely needed?

Looking at your resize listener, maybe you're sizing the Browser to a size
that's larger than the parent shell (because a Shell's size includes its
trim), so the scrollbars are just outside of the Shell's viewport? See if
changing shell.getSize() to shell.getClientArea() helps, and even if it
doesn't, this keep this change since it's more correct.

If this doesn't help then please follow up.

Grant


<mr.peter.chern@gmail.com> wrote in message
news:i9gq7u$k5j$1@news.eclipse.org...
> When I resize my swt browser, the scroll bar comes with it disappears,
> does anyone know why?
>
> Here is my code:
> shell.addListener(SWT.Resize, new Listener() {
> public void handleEvent(Event e) {
> browser.setSize(shell.getSize().x, shell.getSize().y);
> }
> });
Previous Topic:Simple SWT Table
Next Topic:How to not hide cursor when typing
Goto Forum:
  


Current Time: Fri Oct 31 04:55:40 GMT 2014

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

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