SWT Browser Scrollbar [message #633462] |
Mon, 18 October 2010 02:45  |
Eclipse User |
|
|
|
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 10:31  |
Eclipse User |
|
|
|
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);
> }
> });
|
|
|
Powered by
FUDForum. Page generated in 0.04533 seconds