Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Column content disappears on collapse and expand of TableTreeViewer
Column content disappears on collapse and expand of TableTreeViewer [message #458390] Tue, 12 July 2005 19:56 Go to next message
Agnes Freese is currently offline Agnes FreeseFriend
Messages: 14
Registered: July 2009
Junior Member
Hi,

I am having a problem with data disappearing after collapse and expand of a
TableTreeViewer. I have searched the eclipse website and eclipse bugs for
some sign of this issue and haven't found anything as yet. Hoping someone
here might know what the issue is.

I have a TableTreeViewer with two columns. I have a ContentProvider based
on ITreeContentProvider and a LabelProvider based on ITableLabelProvider.
When I expand top level nodes the getColumnText is correctly called in the
label provider to set the values in the second column of the table. I then
do a drag and drop of data from another widget to the second column and in
the drop listener I set the value of the second column TableItem to a new
value.

When I now collapse the tree and re-expand it to see my data again, the data
in the second column is empty. The LabelProvider is not called during the
re-expansion. This is called only the first time the nodes are expanded to
be visible.

How do I keep the data in my second column? I updated it on the TableItem,
but perhaps this is removed during collapse and recreated?? Perhaps I have
to reset this everytime the table is collapsed or expanded??

I would appreciate if anyone has any ideas on this.

Thanks
Re: Column content disappears on collapse and expand of TableTreeViewer [message #458403 is a reply to message #458390] Tue, 12 July 2005 22:05 Go to previous message
Agnes Freese is currently offline Agnes FreeseFriend
Messages: 14
Registered: July 2009
Junior Member
I appear to have solved this. It needs to be set on the TableTreeItem for
the corresponding TableItem.


"Agnes Freese" <afreese@siebel.com> wrote in message
news:db1794$986$1@news.eclipse.org...
> Hi,
>
> I am having a problem with data disappearing after collapse and expand of
a
> TableTreeViewer. I have searched the eclipse website and eclipse bugs for
> some sign of this issue and haven't found anything as yet. Hoping someone
> here might know what the issue is.
>
> I have a TableTreeViewer with two columns. I have a ContentProvider based
> on ITreeContentProvider and a LabelProvider based on ITableLabelProvider.
> When I expand top level nodes the getColumnText is correctly called in the
> label provider to set the values in the second column of the table. I
then
> do a drag and drop of data from another widget to the second column and in
> the drop listener I set the value of the second column TableItem to a new
> value.
>
> When I now collapse the tree and re-expand it to see my data again, the
data
> in the second column is empty. The LabelProvider is not called during the
> re-expansion. This is called only the first time the nodes are expanded
to
> be visible.
>
> How do I keep the data in my second column? I updated it on the
TableItem,
> but perhaps this is removed during collapse and recreated?? Perhaps I
have
> to reset this everytime the table is collapsed or expanded??
>
> I would appreciate if anyone has any ideas on this.
>
> Thanks
>
>
Previous Topic:draw something on the Browser widget
Next Topic:Dialog using run in ApplicationWindow loses focus
Goto Forum:
  


Current Time: Sat Dec 05 18:16:56 GMT 2020

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

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

Back to the top