PDA

View Full Version : How to make data driving formated text?


hww
10-26-2005, 03:23 AM
Hi,

I can use HML format tags in the TEXT class

<text>This <b>bold</b> text</text>

So what, if i use method setText() and text stored to dataset it does not support format tags. And it does not skeep format of source text.

EXAMPLE:
The dataset contain

<dtext>
This is the <b>bold</b> text<br />Next
line
<dtext>

When I put this text to a <text> object by setText() method, it shows:

This is the bold textNext
line

(somthing like that)

How I can solve it?

Shelby
10-26-2005, 05:51 AM
Wrap it in a CDATA tag and it should work just fine.

<dtext><![CDATA[This is the <b>bold</b> text<br />Next line]]>
<dtext>

hww
10-26-2005, 06:29 AM
Originally posted by Shelby
Wrap it in a CDATA tag and it should work just fine.

<dtext><![CDATA[This is the <b>bold</b> text<br />Next line]]>
<dtext>

But CR passes to output text. For exmaple if in a source file will be:
<dtext><![CDATA[This is the <b>bold</b> text<br />Next
line]]> <dtext>

I mean ENDLINE between 'Next' and 'Line' in the output text will be:

Next
..............line