Solved

ECLIPSE RCP app: displaying various UI elements and a Table viewer

Posted on 2012-03-20
1
380 Views
Last Modified: 2012-04-02
In my RCP view, I am displaying a tab folder, few dropdowns ,few text boxes and finally a table viewer. There are 9 columns in my view.
I am choosing grid Layout.

The table viewer  happens to be at the end.

It takes one grid column to display the entire 4 column table and throws of all the alignment.

I want the table viewer to take one grid column for each table column.

How to force that?
I don't have an option to set the layout data for Table viewers.

Any insight is highly appreciated.
Thanks
0
Comment
Question by:kumarSaravanan
1 Comment
 
LVL 1

Accepted Solution

by:
kumarSaravanan earned 0 total points
ID: 37796682
fileCompareTbl = new Table(parent,SWT.MULTI| SWT.BORDER);
TableLayout tblLayout = new TableLayout();
tblLayout.addColumnData(new ColumnWeightData(25,75,true));
tblLayout.addColumnData(new ColumnWeightData(25,75,true));
tblLayout.addColumnData(new ColumnWeightData(25,75,true));
tblLayout.addColumnData(new ColumnWeightData(25,75,true));
[b]fileCompareTbl.setLayoutData(new GridData(GridData.FILL_BOTH));[/b]
fileCompareTbl.setLayout(tblLayout);	

Open in new window



Adding the GridData helped me display the table correctly.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
advertisement module in core php 4 87
Strange loading of website behaviour 3 23
Currency Conversion? 1 37
Java DateChooser? 2 9
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
A short article about problems I had with the new location API and permissions in Marshmallow
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now