Set Background color to the selected portion in the tree.. [message #1647728] |
Tue, 03 March 2015 10:31  |
Eclipse User |
|
|
|
Hello,
I have requirement where we need to set the perticular background color when we select the group of column. It means, The column color shall differentiate between the selected and non-selected columns.
Ina nattable where we have hierarchical structure and non hierarchical structure,
we set the Background color(gray) to the tree structure(hierarchical structure ) and default (white) to non hierarchical structure.
I have tried to set the background color using 'configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,selectionCellStyle,DisplayMode.SELECT); '.
But this color sets only the non hierarchical structure in the body as this is configregistry for Nattable not the tree.
Question is: What I need to do to change the background color for hierarchical structure as well to the selected columns.
Could you please suggest?
[Updated on: Tue, 03 March 2015 10:32] by Moderator
|
|
|
|
|
Re: Set Background color to the selected portion in the tree.. [message #1649575 is a reply to message #1649521] |
Wed, 04 March 2015 06:45  |
Eclipse User |
|
|
|
Quote:Does it consider the TreeLayer.TREE_COLUMN_CELL equals the first column
Yes
Quote:How Can I change the background color for selected portion either hierarchical or non hierachical structure?
I don't understand your question. What do you mean with hierarchical and non hierarchical structure?
As I said before, you need to register for DisplayMode#SELECT AND for DisplayMode#SELECT in combination with TreeLayer.TREE_COLUMN_CELL. So you need to register the style two times. Or ensure there is no style registered for TreeLayer.TREE_COLUMN_CELL anywhere. If that doesn't fit your needs, I don't know what to suggest since I don't understand what you are trying to do then.
|
|
|
Powered by
FUDForum. Page generated in 0.04368 seconds