Community
Participate
Working Groups
With the current RAP CVS version the scrollbars of a ScrolledComposite are displayed unnecessarily. It can be reproduced with the following snippet: public class View extends ViewPart { public static final String ID = "scrolled_comp_bug.view"; @Override public void createPartControl(Composite parent) { ScrolledComposite scrolledComp = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL); scrolledComp.setExpandHorizontal(true); scrolledComp.setExpandVertical(true); Composite comp = new Composite(scrolledComp, SWT.NONE); GridLayoutFactory.swtDefaults().applyTo(comp); scrolledComp.setContent(comp); scrolledComp.setMinSize(comp.computeSize(SWT.DEFAULT, SWT.DEFAULT)); } @Override public void setFocus() {} } This should be the default idiom for using a ScrolledComposite to show the scrollbars if the content of the composite does not fit in the receivers window. However, in this case the scrollbars are display allthough the content fits into the window. Using the same snippet in RCP does not show the scrollbars. The problem can be reproduced with FF 3.6, Chrome & IE8. This issue exists since the fix of this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=327150
Sorry, i was refering to this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=326751
Fixed in CVS HEAD. ScrolledCompositeLCA had assumed wrong default-values for scrollbar-visibility. @Benjamin: It should now work again as expected, otherwise reopen bug.