Skip to main content


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 07:01 Go to next message
Ovidio Mallo is currently offline Ovidio MalloFriend
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 12:07 Go to previous message
Lakshmi P ShanmugamFriend
Messages: 279
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 20 01:10:19 GMT 2024

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

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

Back to the top