How associate a combo in a TableItem in a Table [message #640928] |
Tue, 23 November 2010 15:13 |
kkt8 Mising name Messages: 27 Registered: November 2010 |
Junior Member |
|
|
Hello,
I've a Table with 3 columns.
All cells are TableItem.
In the third column, some cells can contain Combo, but how associate combo and TableItem ?
Table table = new Table(form.getBody(), SWT.NO_SCROLL|SWT.BORDER_SOLID);
TableColumn tc;
tc = new TableColumn(table, SWT.RIGHT);
tc.setWidth(115);
tc = new TableColumn(table, SWT.RIGHT);
tc.setWidth(220);
tc = new TableColumn(table, SWT.RIGHT);
tc.setWidth(240);
table.pack();
TableItem t1 = new TableItem(table, SWT.NONE);
t1.setText(0, "1 col");
TableItem t1 = new TableItem(table, SWT.NONE);
t1.setText(0, "2 col");
.... TableItem with combo ???
Thank you
|
|
|
Re: How associate a combo in a TableItem in a Table [message #640933 is a reply to message #640928] |
Tue, 23 November 2010 15:23 |
Daniel Krügler Messages: 853 Registered: July 2009 |
Senior Member |
|
|
On 11/23/2010 16:14, kkt8 wrote:
> Hello,
>
> I've a Table with 3 columns.
> All cells are TableItem.
> In the third column, some cells can contain Combo, but how associate
> combo and TableItem ?
>
> Table table = new Table(form.getBody(), SWT.NO_SCROLL|SWT.BORDER_SOLID);
> TableColumn tc;
> tc = new TableColumn(table, SWT.RIGHT);
> tc.setWidth(115);
> tc = new TableColumn(table, SWT.RIGHT);
> tc.setWidth(220);
> tc = new TableColumn(table, SWT.RIGHT);
> tc.setWidth(240);
> table.pack();
> TableItem t1 = new TableItem(table, SWT.NONE);
> t1.setText(0, "1 col");
> TableItem t1 = new TableItem(table, SWT.NONE);
> t1.setText(0, "2 col");
> ... TableItem with combo ???
I suggest that you store a reference to the corresponding combo in the
property-bag of the item (look for member data, which is overloaded. I
suggest to use the overload with a specific key, e.g. "combo" or some such).
HTH & Greetings from Bremen,
Daniel Krügler
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04021 seconds