Community
Participate
Working Groups
Build Identifier: M20080911-1700 Created a scrolled form, with a section. Section contains table, Section set to SWT.FILL. Scrollbar visible because table has some more widt. If you rise the width of the view, Table gets wider on next start. Workaround: use Form instead of scrolled form, but in my project, i've added some contend which is better placed in a scrolled Form Reproducible: Always Steps to Reproduce: public final void createPartControl(Composite parent) { toolkit = new FormToolkit(parent.getDisplay()); form = toolkit.createScrolledForm(parent);//Workaround use form GridLayout layout = new GridLayout(); form.getBody().setLayout(layout); Section detailsSection = toolkit.createSection(form.getBody(), Section.TITLE_BAR | Section.EXPANDED); detailsSection.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true,false)); detailsSection.setText("Details"); Composite sectionClient = toolkit.createComposite(detailsSection); TableColumnLayout tableColumnLayout = new TableColumnLayout(); sectionClient.setLayout(tableColumnLayout); Table bDetails = toolkit.createTable(sectionClient, SWT.NONE); bDetails.setHeaderVisible(true); bDetViewer = new TableViewer(bDetails); String[] titles = { "1", "2__x", "3xxxx", "xx4", "x y 5" }; int[] withs = { 21, 12, 25, 17, 25 };//percent for (int i = 0; i < withs.length; i++) { TableViewerColumn column = new TableViewerColumn(bDetViewer, SWT.NONE); column.getColumn().setText(titles[i]); tableColumnLayout.setColumnData(column.getColumn(), new ColumnWeightData(withs[i], 25, true)); column.getColumn().setMoveable(true); } bDetViewer.setContentProvider(new ArrayContentProvider()); // bDetViewer.setLabelProvider(new ...); bDetViewer.setInput(""); detailsSection.setClient(sectionClient); }
(In reply to comment #0) found similar Bug 215997
I just tried the example you pasted into the bug using I20110127-2034 but did not see a scrollbar except when the view was very narrow.
In reaction to the comment of Chris Goldthorpe I tried it with Eclipse 3.6.1 and the newer version of the SWT-Plug-in. Somewehere between the two versions the bug vanishes. (I wrote Eclipse Version 3.4.1 by mistake when I posted the bug but used Eclipse 3.4.0; SWT-Plug-in Version 3.4.1)