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 t开发者_如何学编程hat implementing LineStyleListener only provides coloring of the whole line at a time.
Thanks
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.
精彩评论