Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Text Color
Text Color [message #464825] Wed, 30 November 2005 09:36 Go to next message
Eclipse User
Originally posted by: waves.gmx.ch

I saw similar problem descriptions in here but non of the topics led to a
solution.

I want to change the text color in a treeviewer made with SWT/JFace. is
there an easy way to do this?

thanks for any help in advance.
Re: Text Color [message #464850 is a reply to message #464825] Wed, 30 November 2005 12:41 Go to previous message
Jeremy Dowdall is currently offline Jeremy Dowdall
Messages: 48
Registered: July 2009
Member
if you mean text color per element / item use IColorProvider:

"YOURLabelProvider implements IColorProvider, ITableLabelProvider"
(I'm implementing ITableLabelProvider because all my trees have columns...)


IColorProvider adds two methods:
public Color getForeground(Object element)
public Color getBackground(Object element)


if you add columns and want to set the color per column, there is also
an ITableColorProvider interface...

hope this helps!



Dominik Erbsland wrote:
> I saw similar problem descriptions in here but non of the topics led to
> a solution.
>
> I want to change the text color in a treeviewer made with SWT/JFace. is
> there an easy way to do this?
>
> thanks for any help in advance.
>
Previous Topic:ProgressBar.getSelection()
Next Topic:swt - CTabFolder
Goto Forum:
  


Current Time: Wed Aug 27 11:03:25 EDT 2014

Powered by FUDForum. Page generated in 0.04002 seconds