Images in TreeViewer [message #4155] |
Wed, 28 February 2007 12:13  |
Eclipse User |
|
|
|
I have a view that has a TreeView in it, and for some reason the images
don't work as I expected. When the tree first comes up, it has the folder
image on each element of the tree. I want some of them to be an image
called "Computer.jpg". Once I click on an element of the tree, the image
changes to the correct image, but those that haven't been selected stay as
the default folder icon. In my createPartControl method, I have the
following:
TreeViewer viewer = new TreeViewer(parent);
viewer.setLabelProvider(new ServerTreeViewerLabelProvider());
viewer.setContentProvider(new ServerTreeViewerContentProvider());
viewer.setInput(this);
getSite().setSelectionProvider(viewer);
// viewer.refresh(); // tried this, but didn't change anything
Any ideas?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.25162 seconds