Question

The backstory: I am applying a filter to a TableView. It's a simple 'find the rows with this string' filter.

The requirement: I wish to hilight instances of the search term where they occur.

Thus far I can see no means of doing this. ITableColorProvider let's me apply colours to entire cells, but not to a fraction of it.

Clues most welcome.

Was it helpful?

Solution

Looks like the highlighting method is for you

Since 3.5M4, the existing owner draw support for JFace TableViewer and TreeViewer has been extended to allow multiple fonts within cells. For example, this can be used to highlight matching text in search results using a bold font.

alt text http://update.eclipse.org/downloads/drops/S-3.5M4-200812111908/images/multi-font-labels.png

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top