Solved

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

Posted on 2012-03-20
1
391 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to open text file 11 106
MySqlDump not dumping triggers 1 30
Adding multiple JVM environments to RedHat 6 7 18
Java: anonymous class 4 17
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

806 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