Solved

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

Posted on 2012-03-20
1
420 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Make the most of your online learning experience.
Part One of the two-part Q&A series with MalwareTech.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Starting up a Project

630 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