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 14:36 Go to next message
Eclipse UserFriend
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 17:41 Go to previous message
Jeremy Dowdall is currently offline Jeremy DowdallFriend
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: Thu Nov 27 00:36:19 GMT 2014

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

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