Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Mark/Highlight parts of a text inside column items
Mark/Highlight parts of a text inside column items [message #984330] Wed, 14 November 2012 15:58 Go to next message
Michi Classen is currently offline Michi ClassenFriend
Messages: 36
Registered: March 2012
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 16: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 08:22 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
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
Previous Topic:Can't compile the nattable examples
Next Topic:Moving rows in NatTable when its in sorted state
Goto Forum:
  


Current Time: Thu Mar 28 11:45:42 GMT 2024

Powered by FUDForum. Page generated in 0.08056 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top