|
I want use a RichTextBox to allow users to edit and modify complex report. I need to insert at runtime many optional fields wich comes from a database. I have think "well I will use the rtf command \field !" but this command does work correctly. If you load one file wich \field command like described in rtf syntax, the RichTextBox delete all theses commands and replace it whis the default values AND I did not can edit the fields !
NOT : All versions of the RichEdit Control from Microsoft run like that (in previous versions of VB or VC++)
To reproduce it, insert RichTextBox, implement Load function to load the File, implement one function to get the Rtf code in the control after the Load.
Sample of rtf file : {\rtf1\ansi\ansicpg1252\deff0\deflang1036{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}} \viewkind4\uc1\pard\f0\fs17 Test of field in RTF controls\par The two next lines contains two field like in MDSN rtf definition\par {\field {\*\fldinst AUTHOR \\*MERGEFORMAT }{\fldrslt Joe Smith}}\par {\field{\*\fldinst time \\@ "h:mm AM/PM"}{\fldrslt 8:12 AM}}\par End of fields\par end of text\par \par } Does anibody have a solution to enable the \field in the control !? Thank's
|