Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] FW: scrollbars in browser


Hi Adam,

The HTML content owns this aspect of the presentation. You can try the following.

Define the body tag as below.
<body style='overflow:hidden;'>

Full example:
import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.browser.*;

public class Main {

                public static void main(String[] args) {
                                 final String html = "<html><body
style='overflow:hidden;'><h1>Some javadoc here</h1><p>and some more
here</p></body></html>";
                                 Display display = new Display();
                                 Shell shell = new Shell(display);
                                 shell.setText("PRBrowser");
                                 shell.setLayout(new FillLayout());
                                 final Browser browser = new Browser(shell, SWT.NONE);
                                 browser.setText(html);
                                 shell.open();

                                 while (!shell.isDisposed()) {
                                                  if (!display.readAndDispatch())
                                                                   display.sleep();
                                 }                 }
}

Hope this helps,

Chris



"Adam Morgan" <adam.morgan@xxxxxxxxxx>
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

07/05/2006 03:42 PM

Please respond to
"Eclipse Platform SWT component developers list." <platform-swt-dev@xxxxxxxxxxx>

To
<platform-swt-dev@xxxxxxxxxxx>
cc
Subject
[platform-swt-dev] FW: scrollbars in browser





 
 
I can’t for the life of me get rid of the scrollbars in the Browser class… it is as if they are part of a child widget to the Browser, but since I can’t intercept where the widget is instantiated, I can’t set the style for the widget…
 
Any suggestions???
 
Adam Morgan
Software Engineer, Development
Q1 Labs Inc - Network Security Enforcement for the Enterprise
Office:   506-462-9117 x106
adam.morgan@xxxxxxxxxx | www.q1labs.com
 _______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top