Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Table: Removing not only items, but also all colums(SWT Table: not being able to remove columns)
Table: Removing not only items, but also all colums [message #509688] Sun, 24 January 2010 19:51 Go to next message
Simon L. is currently offline Simon L.Friend
Messages: 22
Registered: January 2010
Junior Member
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 Smile

Thanks Smile
Re: Table: Removing not only items, but also all colums [message #509720 is a reply to message #509688] Mon, 25 January 2010 03:16 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
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 #509798 is a reply to message #509688] Mon, 25 January 2010 12:56 Go to previous messageGo to next message
Simon L. is currently offline Simon L.Friend
Messages: 22
Registered: January 2010
Junior Member
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..

But for now, it works ;D
Re: Table: Removing not only items, but also all colums [message #509808 is a reply to message #509798] Mon, 25 January 2010 13:38 Go to previous message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
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
Previous Topic:Using EMF+ with SWT
Next Topic:An annoying tree control problem
Goto Forum:
  


Current Time: Mon Dec 02 23:47:21 GMT 2024

Powered by FUDForum. Page generated in 0.24145 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top