views:

27

answers:

2

I develop some features based on Eclispe GEF.

I want to create a label with some string. for example: new Label("This is a good test stensece")

Now, I want to get these effects "good" is in Bold font, and "test" is in italic. It looks like can use some HTML way to implement that

So,is there any one knows that?

Thank you very much!

A: 

If you don't want to use StyledText, you could create multiple labels based on substrings of the original string, then use

labelName.setFont(Font font);

on each label to create different fonts for each portion.

Zoot