Label: Render HTML content from String

2007-11-12 Thread Francisco Diaz Trepat - gmail
Hi, I have a Label who's model maight come with markup for bold italic, bullets, etc. (e.g. bThis/b is a iMessage/i) Obviously I get bThis/b is a iMessage/i rendered. Is there a way to get the label to render: *This* is a *Message* thanks, f(t)

Re: Label: Render HTML content from String

2007-11-12 Thread Martijn Dashorst
this should get what you want: add(new Label(foo, text.replaceAll(b, *) .replaceAll(/b, *) .replaceAll(i, *) .replaceAll(/i, *))); Martijn On 11/12/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Hi, I have a Label who's model maight come with markup for bold italic,

Re: Label: Render HTML content from String

2007-11-12 Thread Sebastiaan van Erk
Hehe, nasty! :-) I suggest doing it in one replaceAll though: text.replaceAll([^]*, *) This has the added benefit of correctly treating unexpected and as yet unknown tags, and thus is more future proof! Regards, Sebastiaan Martijn Dashorst wrote: this should get what you want: add(new

Re: Label: Render HTML content from String

2007-11-12 Thread Dmitry Kandalov
On Monday 12 November 2007 23:40:51 Francisco Diaz Trepat - gmail wrote: Hi, I have a Label who's model maight come with markup for bold italic, bullets, etc. (e.g. bThis/b is a iMessage/i) Obviously I get bThis/b is a iMessage/i rendered. Is there a way to get the label to render: *This*

Re: Label: Render HTML content from String

2007-11-12 Thread Francisco Diaz Trepat - gmail
It seams the formatted message I set didn't show well. I want to (as the subject says) Render HTML content from the String. Is there a way to get the label to render: *This* is a *Message* [this line here and in the original message is formatted with bold and italics] On Nov 12, 2007 5:02 PM,