Setting cell background color [message #1396588] |
Tue, 08 July 2014 14:17 |
Alexander Klatt Messages: 59 Registered: April 2014 |
Member |
|
|
Hi,
I would like to customize the background color of the cells in the NatTable. The example program shows this pretty well for the default grid (code here).
In my case though, I use a custom body data provider which does not support the methods used in that code (no getBodyLayer() or selection layer).
In the example doc, I found this easy method to change cell contents :
Style cellStyle = new Style();
cellStyle.setAttributeValue(
CellStyleAttributes.BACKGROUND_COLOR, bgColor);
cellStyle.setAttributeValue(
CellStyleAttributes.FOREGROUND_COLOR, fgColor);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle);
But with this, I can only change the font color, right?
I would appreciate any comments, if you know any advice for me. Thanks!
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03222 seconds