Solved

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

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
servlet example 11 49
maven module vs maven project 3 46
Cisco ASA: Java web start no go, asdm launcher no go 3 34
incorrect syntax near the order by 10 40
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
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.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

808 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