Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Table row colors
Table row colors [message #462357] Sat, 27 January 2007 10:00 Go to next message
Eclipse UserFriend
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 13:00 Go to previous messageGo to next message
Eclipse UserFriend
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 10:09 Go to previous messageGo to next message
Eclipse UserFriend
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 14:51 Go to previous message
Eclipse UserFriend
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: Tue Apr 22 23:06:39 EDT 2025

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

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

Back to the top