Table: Removing not only items, but also all colums [message #509688] |
Sun, 24 January 2010 14:51  |
Eclipse User |
|
|
|
Hi,
I have a SWT Table with several columns, and changing datasets to be displayed in the Table. There seems not to be a method to remove Columns from a Table, which I need for clearing and refilling the Table with new data.
I found out, that disposing the Columns works. But isn#t that a bit too brutal? I need to remove them, just as TableItems can be removed by index.
If this isn't possible, please explain :/ and if you can image a workaround, tell me, too 
Thanks
|
|
|
Re: Table: Removing not only items, but also all colums [message #509720 is a reply to message #509688] |
Sun, 24 January 2010 22:16   |
Eclipse User |
|
|
|
On 24.01.2010 20:51, Simon L. wrote:
> Hi,
> I have a SWT Table with several columns, and changing datasets to be
> displayed in the Table. There seems not to be a method to remove Columns
> from a Table, which I need for clearing and refilling the Table with new
> data.
> I found out, that disposing the Columns works. But isn#t that a bit too
> brutal? I need to remove them, just as TableItems can be removed by index.
>
> If this isn't possible, please explain :/ and if you can image a
> workaround, tell me, too :)
Disposing the column is the right thing to do. Some might suggest to set
the width to 0, but this is clearly a different thing. E.g. we have
written our own table configuration dialog which allows users to
change settings of individual columns (e.g. sort order, enablement,
disablement, etc.). If the column has not been disposed, it's still
part of the table.
- Daniel
|
|
|
|
Re: Table: Removing not only items, but also all colums [message #509808 is a reply to message #509798] |
Mon, 25 January 2010 08:38  |
Eclipse User |
|
|
|
On 25.01.2010 13:56, Simon L. wrote:
> Meanwhile I did exactly the disposing thing, but I feel kind of
> uncomfortable with it :/ Every other SWT Widget I used until now had
> native support for removing and adding every one of it's children
> controls..
Can you present an example? A short view on another SWT component
(TabFolder) with TabItems shows that it follows the same style as
Table with TableColumns.
Greetings from Bremen,
Daniel Krügler
|
|
|
Powered by
FUDForum. Page generated in 0.04156 seconds