scrollbars on TableViewer whether specified or not [message #120644] |
Fri, 06 February 2009 03:22  |
Eclipse User |
|
|
|
Hi,
(I am sure I am doing something silly here, but I have spent ages trying
to work it out...)
Thanks,
I have a tableViewer which I am wanting to fill my ViewPart - and then put
Horizontal and Vertical scrollbars as necessary, however I seem to get
scrollbars whatever I select for style.
public void createPartControl(final Composite parent) {
Composite contents = new Composite(parent, SWT.NONE | SWT.BORDER);
GridLayout glout1 = new GridLayout(1, false);
contents.setLayout(glout1);
GridData gridData = new GridData();
gridData.horizontalAlignment = SWT.FILL;
gridData.grabExcessVerticalSpace = true;
gridData.grabExcessHorizontalSpace = true;
gridData.verticalAlignment = SWT.FILL;
viewer = new TableViewer(contents, SWT.NONE | SWT.BORDER |
SWT.FULL_SELECTION);
final Table table = viewer.getTable();
table.setLayoutData(gridData);
viewer.setContentProvider(new SecurityListContentProvider());
SecurityListLabelProvider lp = new SecurityListLabelProvider();
lp.createColumns(viewer);
viewer.setLabelProvider(lp);
viewer.addDoubleClickListener( this );
viewer.setInput(getViewSite());
table.setLinesVisible(false);
}
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04300 seconds