Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Background color of a deselected table/tree item
Background color of a deselected table/tree item [message #735208] Tue, 11 October 2011 04:39 Go to next message
code404 is currently offline code404
Messages: 6
Registered: October 2010
Junior Member
Hy all,

how can I modify the background color of a deselected table/tree item?
In my SWT application I have two tables A and B. If I select an item from table A the item gets a blue background. If I now select an item from table B the item from table A gets "light gray" background.
This gray is sometimes confusing.
Can I disable this behavior or set the item color to normal background color?

Thanks alot
code404

Example on Win7:
index.php/fa/4212/0/table.jpg
  • Attachment: table.jpg
    (Size: 20.33KB, Downloaded 237 times)
Re: Background color of a deselected table/tree item [message #735218 is a reply to message #735208] Tue, 11 October 2011 05:34 Go to previous message
Lakshmi Shanmugam
Messages: 274
Registered: July 2009
Location: India
Senior Member
If you do not want the selection of the disabled item to be visible you can create the Table with the style SWT.HIDE_SELECTION.

If you want to change the color then you have to use custom drawing --> see Snippet234 and Custom Drawing


Lakshmi P Shanmugam

[Updated on: Tue, 11 October 2011 06:16]

Report message to a moderator

Previous Topic:help to get the size of widgets layouted in GridLayout?
Next Topic:How to revalidate layout?
Goto Forum:
  


Current Time: Sat Aug 23 05:39:13 EDT 2014

Powered by FUDForum. Page generated in 0.08836 seconds