Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Escaping characters in FormText
Escaping characters in FormText [message #459943] Fri, 19 August 2005 19:23 Go to next message
Karsten Lehmann is currently offline Karsten LehmannFriend
Messages: 17
Registered: July 2009
Junior Member
Hello

I use the FormText field to display text and hyperlinks in one sentence.
It is possible to quote characters like '<' and '>' in the hyperlink text?

For my example i got an IllegalArgumentException. I coded this:

StringBuffer buf = new StringBuffer();
buf.append("<form>");
buf.append("<p>");
buf.append("<a href=\"method\">the method name is <init></a>");
buf.append("</p>");
buf.append("</form>");

FormText rtext = this.fToolkit.createFormText(composite, true);
rtext.setText(buf.toString(), true, false);

---
I tried to quote "<init>" like "\\<init\\>" and "&ltinit&gt". Both
results in an IllegalArgumentException.

Best regards ...

Karsten

FYI: i develop against eclipse 3.1
Re: Escaping characters in FormText [message #460258 is a reply to message #459943] Tue, 23 August 2005 14:06 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
If you don't get a good answer here then you should ask this on the
eclipse.platform newsgroup.

Grant

"Karsten Lehmann" <KarstenLehmann@web.de> wrote in message
news:de5bj3$28a$1@news.eclipse.org...
> Hello
>
> I use the FormText field to display text and hyperlinks in one sentence.
> It is possible to quote characters like '<' and '>' in the hyperlink text?
>
> For my example i got an IllegalArgumentException. I coded this:
>
> StringBuffer buf = new StringBuffer();
> buf.append("<form>");
> buf.append("<p>");
> buf.append("<a href=\"method\">the method name is <init></a>");
> buf.append("</p>");
> buf.append("</form>");
>
> FormText rtext = this.fToolkit.createFormText(composite, true);
> rtext.setText(buf.toString(), true, false);
>
> ---
> I tried to quote "<init>" like "\\<init\\>" and "&ltinit&gt". Both
> results in an IllegalArgumentException.
>
> Best regards ...
>
> Karsten
>
> FYI: i develop against eclipse 3.1
Re: Escaping characters in FormText [message #460260 is a reply to message #459943] Tue, 23 August 2005 14:27 Go to previous message
Eclipse UserFriend
Originally posted by: callum.devnet-uk.net

Did you try it with &gt; and &lt; ? In HTML the ; is required.
Previous Topic:Error org.eclipse.swt.SWTException: Class ID not found in registry result
Next Topic:How to activate HW button on Browser
Goto Forum:
  


Current Time: Mon Apr 12 14:13:01 GMT 2021

Powered by FUDForum. Page generated in 0.02517 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top