Rahul Bagal
asked on
concatenate the RTF text
I am stroring the RTF text in the long type field of oracle
rs!textrtf= richtextbox1.textRTF
then restoring
richtextbox1.textRTF=rs!te xtrtf
Now I want to concatenate no of RTF texts from database and show them in a rich textbox as a single document without loosing formating
can you please help me ?
rs!textrtf= richtextbox1.textRTF
then restoring
richtextbox1.textRTF=rs!te
Now I want to concatenate no of RTF texts from database and show them in a rich textbox as a single document without loosing formating
can you please help me ?
An easy way is to have a RichTextBox object in your program ( in a temp form or as an object).
say, you have the rtf in a string as rtf1
you need to concat rtf2 to rtf1
Richtextbox1.selrtf = rtf1
richtextbo1.selrtf = richtextbo1.selrtf + rtf2
Now you can take the rtf text from the Richtextbox as richtextbox1.selrtf and store it in the database.
Another options
You need to remove the ending tag of a Rtf content \para} and the starting tag of the second text,concat them and save.
say, you have the rtf in a string as rtf1
you need to concat rtf2 to rtf1
Richtextbox1.selrtf = rtf1
richtextbo1.selrtf = richtextbo1.selrtf + rtf2
Now you can take the rtf text from the Richtextbox as richtextbox1.selrtf and store it in the database.
Another options
You need to remove the ending tag of a Rtf content \para} and the starting tag of the second text,concat them and save.
ASKER
this Does not work . I write a test program
Dim rtf1, rtf2 As String
Private Sub Command1_Click()
rtf1 = RichTextBox1.TextRTF
rtf2 = RichTextBox2.TextRTF
RichTextBox3.SelRTF = rtf1
RichTextBox3.SelRTF = RichTextBox3.SelRTF + rtf2
End Sub
Invain..
Can you pleas tell me which is starting & Ending tag of the rtf text and which I should concatenate
This is sample RTF..
{\rtf1\ansi\deff0\deftab72 0{\fonttbl {\f0\fswis s MS Sans Serif;}{\f1\froman\fcharse t2 Symbol;}{\f2\fswiss MS Sans Serif;}}
{\colortbl\red0\green0\blu e0;}
\deflang1033\pard\plain\f2 \fs17 SAMPLE RTF TEXT
\par
\par }
Dim rtf1, rtf2 As String
Private Sub Command1_Click()
rtf1 = RichTextBox1.TextRTF
rtf2 = RichTextBox2.TextRTF
RichTextBox3.SelRTF = rtf1
RichTextBox3.SelRTF = RichTextBox3.SelRTF + rtf2
End Sub
Invain..
Can you pleas tell me which is starting & Ending tag of the rtf text and which I should concatenate
This is sample RTF..
{\rtf1\ansi\deff0\deftab72
{\colortbl\red0\green0\blu
\deflang1033\pard\plain\f2
\par
\par }
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Asmita
This really worked out
This really worked out
ASKER