my dog learned polymorphism*
The moose likes Swing / AWT / SWT and the fly likes can we change the default selection color of setSelection() in jface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "can we change the default selection color of setSelection() in jface" Watch "can we change the default selection color of setSelection() in jface" New topic
Author

can we change the default selection color of setSelection() in jface

Bharath Raja
Ranch Hand

Joined: Jan 21, 2009
Posts: 111
I wanna to highlight a specific node of a tree viewer while clicking on one button. For this I'm using the setSelection method of jface's tree viewer. It works but with default highlighting color. Is there any option to change the background or foreground color of specific node in jface tree viewer. I'm using the following code to highlight a specific node.



Any ideas to changing the background or foreground color of specific node in tree viewer or any option to change the background color of default highlighted selection...?


Life is either daring something or nothing - Helen Keller
 
jQuery in Action, 2nd edition
 
subject: can we change the default selection color of setSelection() in jface
 
Similar Threads
Whats the best way to change background of treeNode in JTree
Change Table and Tree color when selected (vice versa)
Problem in changing forground color of JSlider!!
Sort the elements in Tree in SWT
Problem setting focus for a newly added child element in TreeViewer