Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » FormEditor with TableViewer shows two scrollbars
FormEditor with TableViewer shows two scrollbars [message #550158] Thu, 29 July 2010 11:31 Go to next message
Martin Lange is currently offline Martin LangeFriend
Messages: 16
Registered: May 2010
Location: Munich, Germany
Junior Member

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
Re: FormEditor with TableViewer shows two scrollbars [message #628735 is a reply to message #550158] Thu, 23 September 2010 20:22 Go to previous message
Federico Gaule is currently offline Federico GauleFriend
Messages: 21
Registered: September 2010
Location: Buenos Aires, Argentina
Junior Member
Hi

Try creating your table using SWT.NO_SCROLL.

toolkit.createTable(form.getForm().getBody(), SWT.FLAT | SWT.NO_SCROLL);

That should fix your scrolling problem.
Previous Topic:modern/glossy UI with RCP
Next Topic:How to manage workspace(s) in an RCP application
Goto Forum:
  


Current Time: Thu Apr 18 05:10:44 GMT 2024

Powered by FUDForum. Page generated in 0.01794 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top