开发者

Using styledText in SWT application

开发者 https://www.devze.com 2023-01-09 12:59 出处:网络
I have a simple question really: SWT documentation says that if you\'re using styledText, you either implements its API or you implement LineStyleListener.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消