[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: How to set different fonts into the same StyledText widget?
|
You need to be using the "StyleRange" interface (rather complicated -- but the
javadoc will tell you most of what you need; just note that after you have set
a StyleRange of length N, the StyledText widget will behind the scenes break it
into N StyleRanges of length 1).
HTH,
Paul K
Johnny Lo wrote:
> Hi,
>
> I need to set differnt fonts and sizes for the text that is set in the same
> StyledText widget. But when I call setFont() method it will just apply the
> change to the whole text instead of part of the text. Is there any way I
> could set different fonts and sizes to the text with StyledText widget? Or
> should I use TextViewer from JFace?
>
> Thanks for helping
>
> Johnny