• Post Reply Bookmark Topic Watch Topic
  • New Topic

HTML hyperlinks in SWT  RSS feed

 
Patrik Nilsson
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know if there is a way to format normal text to HTML in SWT.

What I am trying to achieve is that I want to have a link in the text but I can't use the HyperlinkClass since the text will need to be translated.
 
Patrik Nilsson
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found a good? way to do this myself by using FormText.

FormText vForm = new FormText(pParentComposite, 0);
vForm.setText(vText, true, false);

Just remember that the text must be wellformed xml with <form> as root element.

<form><p>This is where the real message should be with first link <a href='/myLink.html'>Link1</a> </p></form>

Have a look at FormText
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!