Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Images in TreeViewer
Images in TreeViewer [message #4155] Wed, 28 February 2007 17:13 Go to next message
Paul Gardiner is currently offline Paul GardinerFriend
Messages: 94
Registered: July 2009
Member
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?
Re: Images in TreeViewer [message #4226 is a reply to message #4155] Thu, 01 March 2007 11:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

Thanks for Your hint. The problem as You describe it has been reported
in bug #175650 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=175650).
This is fixed in CVS HEAD and will be released with the M2 build that we
will publish at the end of this week.
Please feel free to post here or open a bug if any further problems arise.

Regards
RAP Team



Paul Gardiner wrote:
> 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?
>
>
Re: Images in TreeViewer [message #4296 is a reply to message #4226] Thu, 01 March 2007 14:58 Go to previous message
Paul Gardiner is currently offline Paul GardinerFriend
Messages: 94
Registered: July 2009
Member
That's great. Thanks.


"R
Previous Topic:An entry point named 'default' does not exists
Next Topic:M2 released
Goto Forum:
  


Current Time: Wed Nov 06 03:13:02 GMT 2024

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

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

Back to the top