I have a SWT shell, with an SWT browser in it. on OSX it works fine, but when on Windows it insists on putting a disabled vertical scrollbar in the shell or browser (i don't know which!). Is there a way of forcing the widgets to hide their scroll bars?
When i call getVerticalScrollBar() or the horizontal equivilant on either the shell or the browser i get null. So is there a way of removing the scrollbars completley?
here is my code, nothing special:
this.shell = new Shell(this.display, SWT.CLOSE | SWT.MIN | SWT.MAX);
开发者_如何学C shell.addListener(SWT.Close, new Listener(){
public void handleEvent(Event event) {
event.doit = false;
location = shell.getLocation();
shell.setVisible(false);
}
});
shell.setSize(popUpSize);
shell.setMinimumSize(popUpSize);
if(this.location == null){
shell.setLocation(x, y);
}else{
shell.setLocation(this.location);
}
shell.setLayout(new FillLayout());
this.browser = new Browser(shell, SWT.NONE | SWT.SMOOTH);
Any ideas?
Cheers
Andy
I had a similar problem with SWT browser objects. I ended up using the "overflow:hidden" CSS style in my HTML page, which tells the browser to suppress scrollbars and clip the webpage at the edge of the browser window if the page is too big to fit.
I had the same problem. "overflow:hidden" CSS style didn't help. The only way to do the trick was using an ugly old body attribute:
<body scroll="auto">
精彩评论