Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2012-03-20
1
Medium Priority
?
435 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

886 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