Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Change SWT List selection color
Change SWT List selection color [message #731155] Fri, 30 September 2011 03:01 Go to next message
Ovidio Mallo is currently offline Ovidio Mallo
Messages: 35
Registered: July 2009
Member
Hi all,

I wanted to ask whether it's possible to programmatically change the
selection color of an SWT List? Neither the SWT.EraseItem events nor the
JFace IColorProvider interfaces seem to work for Lists. I've seen a very
old post from 2008 stating that changing the selection color of Lists is
indeed not possible but I was hoping that this might have changed in the
meantime :).

Thanks in advance for any help!
Ovidio
Re: Change SWT List selection color [message #731889 is a reply to message #731155] Mon, 03 October 2011 08:07 Go to previous message
Lakshmi Shanmugam
Messages: 274
Registered: July 2009
Location: India
Senior Member
Hi,

This is not possible for List, but can be done for Tree and Table.
SWT.EraseItem event doesn't work for List, works only for Table & Tree.

If you like, you can replace the List with a Table and have a similar UI. The selection color for the Table can be modified using Custom Drawing (see SWT.EraseItem listener in this example snippet 234)


Lakshmi P Shanmugam
Previous Topic:maximize shell
Next Topic:Can DateTime widget display hours in 24-hour format?
Goto Forum:
  


Current Time: Sat Apr 19 11:58:21 EDT 2014

Powered by FUDForum. Page generated in 0.04450 seconds