Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to modify Table columns dynamically
How to modify Table columns dynamically [message #445765] Wed, 10 November 2004 19:00 Go to next message
John Wang is currently offline John WangFriend
Messages: 1
Registered: July 2009
Junior Member
Hi,
I'd like to build a table/tableviewer that displays the result of SQL
query. Each time the result will return different set of table columns. I
used a table/tableviewer to display the result, it needs to dynamically
change the table columns for each resultset. However, I can not find a
method in Table or TableViewer to modify the TableColumn inside. Also the
columns[] is a private member in Table.class and is invisible even I
inherits from it.
Do I have to recreat a new tableviewer everytime a resultset is returned?
Thanks a lot,
John
Re: How to modify Table columns dynamically [message #445777 is a reply to message #445765] Thu, 11 November 2004 01:29 Go to previous message
Eclipse UserFriend
Originally posted by: nickthat.yahoo.com

John,
I think what you will need to do is call Table.getColumns to get your
array of columns. Then iterate through the array and call dispose on each
column. Then you will need to recreate the new set of columns.

Nick

John Wang wrote:

> Hi,
> I'd like to build a table/tableviewer that displays the result of SQL
> query. Each time the result will return different set of table columns. I
> used a table/tableviewer to display the result, it needs to dynamically
> change the table columns for each resultset. However, I can not find a
> method in Table or TableViewer to modify the TableColumn inside. Also the
> columns[] is a private member in Table.class and is invisible even I
> inherits from it.
> Do I have to recreat a new tableviewer everytime a resultset is returned?
> Thanks a lot,
> John
Previous Topic:Displaying the Selection Hilighting When doing a programatic selection in a TableViewer
Next Topic:Gtk and GLContext question.
Goto Forum:
  


Current Time: Fri Apr 26 04:25:56 GMT 2024

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

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

Back to the top