|
|
Re: How to configure the Selection Style to not override the text foreground color of a selected cel [message #1799295 is a reply to message #1799181] |
Tue, 04 December 2018 10:49 |
Hilger Steenblock Messages: 16 Registered: June 2016 |
Junior Member |
|
|
Thank you for pointing to a typical problem. My first mistake was that I forgot to configure the cell foreground color for the DisplayMode.SELECT mode:
Style style = new Style();
style.setAttributeValue(
CellStyleAttributes.FOREGROUND_COLOR,
MYCOLOR);
configRegistry.registerConfigAttribute(
CellConfigAttributes.CELL_STYLE,
style,
DisplayMode.NORMAL,
MYLABEL);
configRegistry.registerConfigAttribute(
CellConfigAttributes.CELL_STYLE,
style,
DisplayMode.SELECT,
MYLABEL);
Actually the selection anchor overrides the cell foreground color and uses always a white color (instead of the configured MYCOLOR color).
I tried to set a painter in the theme but I didn't succeed. Here's the snippet of what I have tried out:
this.selectionAnchorCellPainter =
new BackgroundPainter(
new PaddingDecorator(
new TextPainter(false, false),
1,
5,
0,
5,
false));
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03953 seconds