Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Changing colour of items in a List control?
Changing colour of items in a List control? [message #454491] Fri, 22 April 2005 14:17 Go to next message
Mark Melvin is currently offline Mark MelvinFriend
Messages: 118
Registered: July 2009
Senior Member
I would like to change the background or foreground colour of items in a
list control to indicate status. I don't think this is possible, but
can anyone give me any hint as to the best control to use for this type
of behaviour? Or is it possible and I am missing something? I
currently have an implementation that uses a List, but I want to add
some functionality to show that certain items in the list have an error
condition, so I would like to highlight them red (or something).

I looked at a JFace ListViewer, but shoe-horning a ContentProvider and
underlying data model into the current code will be...well...difficult.

Thanks,
Mark.
Re: Changing colour of items in a List control? [message #454492 is a reply to message #454491] Fri, 22 April 2005 15:23 Go to previous message
Robert Bacs is currently offline Robert BacsFriend
Messages: 165
Registered: July 2009
Senior Member
Try to use a Table control instead of a List control. From the JFace package
you can use the TableViewer wrapper class.

Regards,
Boby

"Mark Melvin" <mark_melvin@amis.com> wrote in message
news:d4b145$e7p$1@news.eclipse.org...
> I would like to change the background or foreground colour of items in a
> list control to indicate status. I don't think this is possible, but
> can anyone give me any hint as to the best control to use for this type
> of behaviour? Or is it possible and I am missing something? I
> currently have an implementation that uses a List, but I want to add
> some functionality to show that certain items in the list have an error
> condition, so I would like to highlight them red (or something).
>
> I looked at a JFace ListViewer, but shoe-horning a ContentProvider and
> underlying data model into the current code will be...well...difficult.
>
> Thanks,
> Mark.
Previous Topic:ComboBoxCellEditor
Next Topic:Menubar background images?
Goto Forum:
  


Current Time: Sun Mar 07 05:02:24 GMT 2021

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

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

Back to the top