Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsMark/Highlight parts of a text inside column items
https://www.eclipse.org/forums/index.php/mv/msg/439019/984330/#msg_984330
In example: The textvalue 'ab' should be marked by color red: | Col1 | Col2 | Col3 |
| abc | def | ghj |
| cab | bca | lsk |
The existing label overrider CellOverrideLabelAccumulator, ColumnOverrideLabelAccumulator and RowOverrideLabelAccumulator mark a complete column, row or cell and I need an overrider for the text of all cells.
]]>Michi Classen2012-11-14T15:58:50-00:00Re: Mark/Highlight parts of a text inside column items
https://www.eclipse.org/forums/index.php/mv/msg/439019/985200/#msg_985200
To explain:
1. The label accumulators are designed to attach labels to cells. This way you achieve different cell behaviour. So they are not meant to deal with cell contents in detail.
2. The painters which are responsible for rendering the cell contents (e.g. TextPainter in your case) only do a full styling by setting the style configured for the label to the GC and then draw the content. They are not designed to do e.g. rich text styling.
If you want to achieve this you'll have to define some "language" for your cell content that allows rich text styling, like HTML for example. And then you'll need to define your own painter that can interprete that markups.