Problem with RichTextbox Rtf property, is it a major bug?

G

Guest

I've been having a major problem using the Rtf property of the Richtextbox. I
use the RTB to generate RTF code to save it in an access database. I'm
successfully able to do this.

However, the moment I retrieve the RTF code from the database back to the
Rtf property, it ignores any tags that refer to bullet information. I don't
understand why.

This is the code that is stored in the database generated by the Richtextbox:

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0
Microsoft Sans Serif;}{\f1\fnil\fcharset2 Symbol;}}
{\colortbl ;\red0\green0\blue0;}
\viewkind4\uc1\pard\f0\fs17 T\cf1 here should be a bulleted list here\par
\pa
\pard{\pntext\f1\'B7\tab}{\*\pn\pnlvlblt\pnf1\pnindent0{\pntxtb\'B7}}bullet\par
{\pntext\f1\'B7\tab}bullet\par
{\pntext\f1\'B7\tab}bullet\par
{\pntext\f1\'B7\tab}bullet\par
{\pntext\f1\'B7\tab}bullet\cf0\par
}

The moment I try to reference it back to the Rtf property like this,

rtfstring =
"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0
Microsoft Sans Serif;}{\f1\fnil\fcharset2 Symbol;}}
{\colortbl ;\red0\green0\blue0;}
\viewkind4\uc1\pard\f0\fs17 T\cf1 here should be a bulleted list here\par
\pa
\pard{\pntext\f1\'B7\tab}{\*\pn\pnlvlblt\pnf1\pnindent0{\pntxtb\'B7}}bullet\par
{\pntext\f1\'B7\tab}bullet\par
{\pntext\f1\'B7\tab}bullet\par
{\pntext\f1\'B7\tab}bullet\par
{\pntext\f1\'B7\tab}bullet\cf0\par
}"

richtextbox.rtf = rtfstring

The only code that is accepted by the Rtf property is,

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0
Microsoft Sans Serif;}}
\viewkind4\uc1\pard\f0\fs17\par
}

What I dont' understand about this is, the RTF code was generated by the
Richtextbox. How come, I can't reference it back to the same Richtextbox? In
the process of retrieval and saving, there aren't any modifications to the
value of the RTF code.

Please help me on this. If you've encountered this before or if you know
anything about the behavior of Rtf in the Richtextbox control built in .Net.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top