hi,
and a very successfull year to all of you
the current project I'm working on is at the stage of creating a formatted report to
be printed.
I use RichTextBox to build the text and then add the formatting to the corresponding RTF.
which might look like this :
rtf.OnCmd(BOLD); rtf.AddText("*"); rtf.OffCmd(BOLD);
rtf is an instance of CRtbx derived from RichTextBox.
OnCmd(..) adds an rtf on-tag, OffCmd(..) adds an rtf off-tag, AddText does Text.Append("..");
for the last two weeks i've experimented a lot with RTF and
what is working is : add font to fonttable, set font, set font size and
set text to bold, underline and italics.
Now here is what got me stuck for about a week :
I'm unable to add the Info-Group with some Items ({\Info {Itm1}...{ItmN}}
I do :
rtf.AddText("*");
string strRtf = Rtf;
strRtf looks like this (A):
{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1031<br />
{\\fonttbl{\\f0\\fnil\\fcharset0 Microsoft Sans Serif;}}\r\n<br />
\\viewkind4\\uc1\\pard\\f0\\fs17<br />
*\\par\r\n}\r\n"
after inserting the Info-Group with the item 'nofpages1' strRtf looks like this (B):
{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1031<br />
{\\fonttbl{\\f0\\fnil\\fcharset0 Microsoft Sans Serif;}}\r\n<br />
{\\Info{\\nofpages1}}<br />
\\viewkind4\\uc1\\pard\\f0\\fs17<br />
*\\par\r\n}\r\n"
but after
Rtf = strRtf
Rtf hasn't changed and still looks like (A)
what am I doing wrong here ?
so far google was of no help at all
thanks in advance