tags:

views:

24

answers:

1

I have a simple question really: SWT documentation says that if you're using styledText, you either implements its API or you implement LineStyleListener.

So, If I do use LineStyleListener, how can I still control the representation of specific characters in the editor widget? It seems that implementing LineStyleListener only provides coloring of the whole line at a time.

Thanks

+1  A: 

With the LineStyleListener you can still add styles for single characters by modifying the provided StyleRange array. It is called LineStyleListener only because you get the text by lines.

For explanations how to use this, see here or here.

the.duckman