Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Table row colors
Table row colors [message #462357] Sat, 27 January 2007 15:00 Go to next message
J Taylor is currently offline J TaylorFriend
Messages: 8
Registered: July 2009
Junior Member
I am in the process of re-writing an application written in an obsolete,
proprietary language. The original app uses table rows with different
background colors to flag different conditions but I cannot seem to find
any way to replicate this. Is it possible, and if so, can anyone provide
examples?

Thanks
Re: Table row colors [message #462367 is a reply to message #462357] Sat, 27 January 2007 18:00 Go to previous messageGo to next message
Ilya Shinkarenko is currently offline Ilya ShinkarenkoFriend
Messages: 22
Registered: July 2009
Junior Member
That depends.

If you use JFace TableViewer, then let your Label provider additionaly
implement IColrProvider interface.

If you work directly with Table widget, then use
TableItem#setBackground(Color) method. TableItem represent a row in a table.

Greetz
Ilya

J Taylor wrote:
> I am in the process of re-writing an application written in an obsolete,
> proprietary language. The original app uses table rows with different
> background colors to flag different conditions but I cannot seem to find
> any way to replicate this. Is it possible, and if so, can anyone provide
> examples?
>
> Thanks
Re: Table row colors [message #462381 is a reply to message #462357] Sun, 28 January 2007 15:09 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jface.s nippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippet s/viewers/Snippet013TableViewerNoMandatoryLabelProvider.java ?view=markup

J Taylor schrieb:
> I am in the process of re-writing an application written in an obsolete,
> proprietary language. The original app uses table rows with different
> background colors to flag different conditions but I cannot seem to find
> any way to replicate this. Is it possible, and if so, can anyone provide
> examples?
>
> Thanks
Re: Table row colors [message #462874 is a reply to message #462357] Thu, 01 February 2007 19:51 Go to previous message
J Taylor is currently offline J TaylorFriend
Messages: 8
Registered: July 2009
Junior Member
Color red = Display.getCurrent().getSystemColor(SWT.COLOR_RED);
item.setBackground(red);

That was what I needed.

Thanks

"J Taylor" <jtaylor@lorencook.com> wrote in message
news:epfpdu$qj$2@utils.eclipse.org...
>I am in the process of re-writing an application written in an obsolete,
> proprietary language. The original app uses table rows with different
> background colors to flag different conditions but I cannot seem to find
> any way to replicate this. Is it possible, and if so, can anyone provide
> examples?
>
> Thanks
Previous Topic:Problems with TableViewer and ComboboxCellEditors
Next Topic:No scroll bars for ScrolledComposite?
Goto Forum:
  


Current Time: Sat Oct 05 03:49:37 GMT 2024

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

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

Back to the top