Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Dynamically add/remove columns from a table?
Dynamically add/remove columns from a table? [message #773519] Sun, 01 January 2012 16:56 Go to next message
John Lussmyer is currently offline John Lussmyer
Messages: 96
Registered: December 2010
Member
I have a Table with a TableViewer, and it has TableViewerColumns in it.
I'd like to be able to dynamically add/remove columns in response to user input.
Adding Columns is easy, you just add them and tell the view to refresh.

I've been unable to find a way to REMOVE a column though. How can that be done?
Re: Dynamically add/remove columns from a table? [message #775432 is a reply to message #773519] Thu, 05 January 2012 19:47 Go to previous messageGo to next message
John Lussmyer is currently offline John Lussmyer
Messages: 96
Registered: December 2010
Member
Is it impossible to remove columns from Tables?
Re: Dynamically add/remove columns from a table? [message #775588 is a reply to message #773519] Fri, 06 January 2012 05:08 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5261
Registered: July 2009
Senior Member
You dispose it using col.getColumn().dispose()

Tom

Am 01.01.12 22:56, schrieb Missing name Mising name:
> I have a Table with a TableViewer, and it has TableViewerColumns in it.
> I'd like to be able to dynamically add/remove columns in response to
> user input.
> Adding Columns is easy, you just add them and tell the view to refresh.
>
> I've been unable to find a way to REMOVE a column though. How can that
> be done?
>
Re: Dynamically add/remove columns from a table? [message #775946 is a reply to message #775588] Fri, 06 January 2012 20:32 Go to previous message
John Lussmyer is currently offline John Lussmyer
Messages: 96
Registered: December 2010
Member
Thanks. For some reason I was thinking the dispose() methods were more along the line of memory management.
All the other windowing systems I've used had removeXXX() methods.
Previous Topic:Get list of Recently Opened File & display it in a dialog
Next Topic:How to limit Label control height?
Goto Forum:
  


Current Time: Fri Aug 01 06:05:46 EDT 2014

Powered by FUDForum. Page generated in 0.02906 seconds