| Mark/Highlight parts of a text inside column items [message #984330] |
Wed, 14 November 2012 10:58  |
Michi Classen Messages: 29 Registered: March 2012 |
Junior Member |
|
|
I'm searching for a good solution to mark a text or just parts of a text inside one or more columns.
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.
[Updated on: Wed, 14 November 2012 11:41] Report message to a moderator
|
|
|
| Re: Mark/Highlight parts of a text inside column items [message #985200 is a reply to message #984330] |
Thu, 15 November 2012 03:22  |
Dirk Fauth Messages: 525 Registered: July 2012 |
Senior Member |
|
|
What you like to do is a rich text formatting of cell contents. This is currently not supported.
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.
Greez,
Dirk
|
|
|
Powered by
FUDForum. Page generated in 0.01501 seconds