Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Please help with Browser Scrollbars
Please help with Browser Scrollbars [message #458472] Thu, 14 July 2005 07:55 Go to next message
Eclipse UserFriend
Originally posted by: gregoire.diboula.gmx.net

Hello Everybody,

Could you please help me with the following issue. I am trying to use
the SWT Browser. Yet, I can not completely remove the vertical
scrollbar. Is there anyway to achieve this? My code follows.

Thanks so much.


Gregoire.


import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.SWT;
import org.eclipse.swt.*;
import org.eclipse.swt.browser.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;

public class HTMLTEST {
public static void main(String [] args) {

Display display = new Display();
Shell shell = new Shell(display, SWT.NONE);
shell.setLayout(new FillLayout());

shell.setSize(200, 700);
{
Browser browser = new Browser(shell, SWT.NONE
| SWT.SMOOTH
);
browser.setText("<HTML><HEAD><TITLE>HTMLTest"+
"</TITLE></HEAD><BODY></BODY></HTML>");
}

shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
}
Re: Please help with Browser Scrollbars [message #458476 is a reply to message #458472] Thu, 14 July 2005 10:35 Go to previous messageGo to next message
Benjamin Pasero is currently offline Benjamin PaseroFriend
Messages: 337
Registered: July 2009
Senior Member
You have to do it using HTML, e.g.

<body style="overflow:auto;">

See http://en.selfhtml.org/css/eigenschaften/positionierung.htm# overflow

Ben

> Hello Everybody,
>
> Could you please help me with the following issue. I am trying to use
> the SWT Browser. Yet, I can not completely remove the vertical
> scrollbar. Is there anyway to achieve this? My code follows.
>
> Thanks so much.
>
>
> Gregoire.
>
>
> import org.eclipse.swt.browser.Browser;
> import org.eclipse.swt.SWT;
> import org.eclipse.swt.*;
> import org.eclipse.swt.browser.*;
> import org.eclipse.swt.layout.*;
> import org.eclipse.swt.widgets.*;
>
> public class HTMLTEST {
> public static void main(String [] args) {
>
> Display display = new Display();
> Shell shell = new Shell(display, SWT.NONE);
> shell.setLayout(new FillLayout());
>
> shell.setSize(200, 700);
> {
> Browser browser = new Browser(shell, SWT.NONE
> | SWT.SMOOTH
> );
> browser.setText("<HTML><HEAD><TITLE>HTMLTest"+
> "</TITLE></HEAD><BODY></BODY></HTML>");
> }
>
> shell.open();
> while (!shell.isDisposed()) {
> if (!display.readAndDispatch())
> display.sleep();
> }
> display.dispose();
> }
> }
Re: Please help with Browser Scrollbars [message #458541 is a reply to message #458476] Fri, 15 July 2005 05:48 Go to previous message
Eclipse UserFriend
Originally posted by: gregoire.diboula.gmx.net

Thanks Ben; You made my day!

Benjamin Pasero wrote:
> You have to do it using HTML, e.g.
>
> <body style="overflow:auto;">
>
> See http://en.selfhtml.org/css/eigenschaften/positionierung.htm# overflow
>
Previous Topic:Preventing focus with Tables etc
Next Topic:RCP application contains only swing widget.
Goto Forum:
  


Current Time: Tue Apr 16 22:25:32 GMT 2024

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

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

Back to the top