Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT Browser Scrollbar(Scrollbar disappears)
SWT Browser Scrollbar [message #633462] Mon, 18 October 2010 02:45 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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: Sat Jul 05 02:25:26 EDT 2025

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

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

Back to the top