Skip to main content


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 08:39 Go to next message
code404 is currently offline code404Friend
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 565 times)
Re: Background color of a deselected table/tree item [message #735218 is a reply to message #735208] Tue, 11 October 2011 09:34 Go to previous message
Lakshmi P ShanmugamFriend
Messages: 279
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 10: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: Fri Apr 26 17:48:26 GMT 2024

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

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

Back to the top