Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » TableViewer & table cell color
TableViewer & table cell color [message #445236] Fri, 29 October 2004 12:31 Go to next message
Sebastian is currently offline SebastianFriend
Messages: 26
Registered: July 2009
Junior Member
How can I modify the front or background color of a table cell
programatically. LabelDecorator is obviously only responsible to provide
the text to be displayed in a table cell. In my case the underlying
table has a column displaying numeric values. I want to get them
displayed in black when they are positive and in red when they are negative.

Thanks for any ideas in advance!

Seb
Re: TableViewer & table cell color [message #445237 is a reply to message #445236] Fri, 29 October 2004 12:32 Go to previous messageGo to next message
Sebastian is currently offline SebastianFriend
Messages: 26
Registered: July 2009
Junior Member
Sebastian wrote:
> How can I modify the front or background color of a table cell
> programatically. LabelDecorator is obviously only responsible to provide
> the text to be displayed in a table cell. In my case the underlying
> table has a column displaying numeric values. I want to get them
> displayed in black when they are positive and in red when they are
> negative.
>
> Thanks for any ideas in advance!
>
> Seb

With "LabelDecorator" I meant LabelProvider. Sorry for that.
Re: TableViewer & table cell color [message #445288 is a reply to message #445237] Mon, 01 November 2004 16:51 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
If you don't get an answer here you should ask this in the eclipse.platform
newsgroup. SWT TableItems do support setting individual foreground and
background Colors, but I don't know if this is exposed through the jface
world yet.

Grant

"Sebastian" <nospam_st@gmx.net> wrote in message
news:cltd8s$art$2@eclipse.org...
> Sebastian wrote:
> > How can I modify the front or background color of a table cell
> > programatically. LabelDecorator is obviously only responsible to provide
> > the text to be displayed in a table cell. In my case the underlying
> > table has a column displaying numeric values. I want to get them
> > displayed in black when they are positive and in red when they are
> > negative.
> >
> > Thanks for any ideas in advance!
> >
> > Seb
>
> With "LabelDecorator" I meant LabelProvider. Sorry for that.
Previous Topic:L & F
Next Topic:ISharedTextColors implementation
Goto Forum:
  


Current Time: Tue Apr 23 06:53:31 GMT 2024

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

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

Back to the top