FormEditor with TableViewer shows two scrollbars [message #550158] |
Thu, 29 July 2010 11:31 |
|
Hi *,
I have a little problem with an application I'm developing right now.
I hava created an multipage editor ( ... extends FormEditor). One of the pages ( ... extends FormPage) should only display an table that fills the whole available space. Right now, I have created this page with the following snippet.
// ...
protected void createFormContent(IManagedForm managedForm) {
toolkit = managedForm.getToolkit();
form = managedForm.getForm();
form.getForm().getBody().setLayout(new FillLayout());
table = toolkit.createTable(form.getForm().getBody(), SWT.FLAT);
table.setHeaderVisible(true);
table.setLinesVisible(true);
toolkit.paintBordersFor(table.getParent());
int col = 0;
TableColumn tc = new TableColumn(table, SWT.LEFT, col++);
tc.setText("#1");
tc = new TableColumn(table, SWT.RIGHT, col++);
tc.setText("#2");
table.getColumn(0).setWidth(150);
table.getColumn(1).setWidth(100);
tableViewer = new TableViewer(table);
tableViewer.setContentProvider(ArrayContentProvider.getInstance());
// ...
I used the FillLayout that my table fills the whole available space.
It works fine until I add to many items in the table. In that case, i got two scrollbars, one from the table, one from the form.
How can I implements something like that with only one scrollbar if nessecary?
Thanks in advance,
- Martin
|
|
|
|
Powered by
FUDForum. Page generated in 0.03186 seconds