Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » [Jface] How do I set the background color on the nodes in a tree viewer.
[Jface] How do I set the background color on the nodes in a tree viewer. [message #119594] Fri, 29 August 2003 19:12 Go to next message
Eclipse UserFriend
Hi:

When building a tree myself I can paint nodes different background
colors by using the setBackground and setForeground methods on TreeItem.
I have now put my tree into a tree viewer (and hence allow the tree
viewer to build the SWT tree). In my label provider there is only
methods for getting text and getting images.

Is it possible to paint the background and foreground of the nodes in a
tree managed by a tree viewer?

Thanks,
Philip.
Re: [Jface] How do I set the background color on the nodes in a tree viewer. [message #119607 is a reply to message #119594] Fri, 29 August 2003 19:20 Go to previous message
Eclipse UserFriend
I believe your label provider for your tree viewer needs to implement
org.eclipse.jface.viewers.IColorProvider.

"Philip Denno" <pdenno@rational.com> wrote in message
news:biomi7$pn3$1@eclipse.org...
> Hi:
>
> When building a tree myself I can paint nodes different background
> colors by using the setBackground and setForeground methods on TreeItem.
> I have now put my tree into a tree viewer (and hence allow the tree
> viewer to build the SWT tree). In my label provider there is only
> methods for getting text and getting images.
>
> Is it possible to paint the background and foreground of the nodes in a
> tree managed by a tree viewer?
>
> Thanks,
> Philip.
>
Previous Topic:Fastview Outline -- Opinions Requested
Next Topic:[URGENT] Eclipse wiped out my directory
Goto Forum:
  


Current Time: Sat May 10 09:20:36 EDT 2025

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

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

Back to the top