Thanks guys for the reply and help...Jonathan that
looks way cleaner than
mine. I'll try that.

I will also look into the Tx Text Control and see if
it can help me. There
is so much garbage inside those rtf files it's
ridiculous.

 And J, I would not know what to tell them if they
said the second column
needs bold. I would probably direct them to Word and
tell them to open it up
and change it if they want it that dang bad hehe.

 Why is it that I can work with some C++, C# and a
host of other languages
and yet RTF code is the only code that makes my eyes
burn. Ugh.

Thanks again for the help. Have a great weekend and
stay safe.

Steve

-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf
Of Jonathan Heizer
Sent: Friday, May 26, 2006 10:49 AM
To: [email protected]
Subject: Re: [ADVANCED-DOTNET] RTF Editor and RTF
Table Generation

I was actually working on this same problem this
morning.  The table I am
producing is 2 cells wide.  I already have the header
row there and I am
just producing a varying number of rows below it.  I
am dropping this onto
the rtf for each row

\trowd \irow3\irowband1
\ts11\trgaph108\trrh300\trleft-14\trftsWidth3\trwWidth2720\trftsWidthB3\trft
sWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpa
ddfr3 \clvertalb\clbrdrt\brdrnone
\clbrdrl\brdrs\brdrw10
\clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10

\cltxlrtb\clNoWrap\clftsWidth3\clwWidth1380\clshdrawnil
\cellx1366\clvertalb\clbrdrt\brdrnone
\clbrdrl\brdrnone
\clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10
\cltxlrtb\clNoWrap\clftsWidth3\clwWidth1340\clshdrawnil
\cellx2706\row }
\pard \qr
\li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0\parars
id3243697
{\insrsid3243697 Cell 1 Text Here}
{\insrsid3243697\charrsid3243697 \cell }
{\insrsid3243697 Cell 2 Text Here}
{\insrsid3243697\charrsid3243697 \cell } \pard \ql
\li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0
{\f0\fs20\insrsid3243697\charrsid3243697


It not quiet as ugly as yours, but still a big mess.
I bet of lot of it is
extra like previous replies suggested, but if it works
I am going for it.  I
am only going to have 20-25 rows in a rtf that is
already 1.5MB from the
graphics files in use.

Good luck

Jon



-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf
Of Steve Welborn
Sent: Thursday, May 25, 2006 11:50 AM
To: [email protected]
Subject: [ADVANCED-DOTNET] RTF Editor and RTF Table
Generation

Good Afternoon,

        I am looking for an Editor for RTF. Not a
wysiwyg editor where it's
a basic RTF Control, I mean an editor for the RTF code
where you can see the
code and output at the same time and make changes.

        I am working on a project now that is calling
for a table in my
documents. The table will have to be generated via
code and although I have
the rtf code to do it, I can't seem to decipher where
the row/cell starts
and ends.

        the rtf code I have is from me creating it
manually in Word then
opening it up in notepad and copying all but the
header and last '}'. I
tried to parse it out the best I could into what would
be the Header of the
table and the row/cell below that.


       Here is what I got so far..I hope this formats
well *crosses fingers*



     HEADER:

     CELL1 (I think)

     \\trowd
\\irow0\\irowband0\\ts16\\trgaph115\\trrh252\\trleft-115\\trbrdrt\\brdrs\\br
drw30   \\trbrdrl\\brdrs\\brdrw30
\\trbrdrb\\brdrs\\brdrw30
\\trbrdrr\\brdrs\\brdrw30   \\trbrdrh\\brdrs\\brdrw30
\\trbrdrv\\brdrs\\brdrw30


\\tpvpara\\tphpg\\tposx2405\\tposnegy-6\\tdfrmtxtLeft180\\tdfrmtxtRight180\\
trftsWidth3\\trwWidth5140\\trftsWidthB3\\trftsWidthA3\\trpaddl115\\trpaddr11
5\\trpaddfl3\\trpaddft3\\trpaddfb3\\trpaddfr3\\tbllkhdrrows\\tbllklastrow\\t
bllkhdrcols\\tbllklastcol   \\clvertalc\\clbrdrt

     \\brdrs\\brdrw30   \\clbrdrl\\brdrs\\brdrw30
\\clbrdrb\\brdrs\\brdrw30
\\clbrdrr\\brdrs\\brdrw30
\\clcbpat17\\cltxlrtb\\clftsWidth3\\clwWidth2609\\clcbpatraw17
\\cellx2494\\clvertalc\\clbrdrt\\brdrs\\brdrw30
\\clbrdrl\\brdrs\\brdrw30
\\clbrdrb\\brdrs\\brdrw30 \\clbrdrr\\brdrs\\brdrw30


\\clcbpat17\\cltxlrtb\\clftsWidth3\\clwWidth2531\\clcbpatraw17
\\cellx5025\\pard\\plain \\qc
\\li0\\ri-103\\widctlpar\\intbl\\tx1575\\pvpara\\phpg\\posx2405\\posnegy-6\\
dxfrtext180\\dfrmtxtx180\\dfrmtxty0\\aspalpha\\aspnum\\faauto\\adjustright\\
rin-103\\lin0\\pararsid9326325\\yts16


\\fs24\\lang1033\\langfe1033\\cgrid\\langnp1033\\langfenp1033
{\\b\\f38\\cf8\\insrsid9326325 Profile
Name}{\\b\\f38\\cf8\\insrsid9326325\\charrsid12210558
\\cell   }}



     CELL2 (I think)

     \\trowd
\\irow0\\irowband0\\ts16\\trgaph115\\trrh252\\trleft-115\\trbrdrt\\brdrs\\br
drw30   \\trbrdrl\\brdrs\\brdrw30
\\trbrdrb\\brdrs\\brdrw30
\\trbrdrr\\brdrs\\brdrw30   \\trbrdrh\\brdrs\\brdrw30
\\trbrdrv\\brdrs\\brdrw30


\\tpvpara\\tphpg\\tposx2405\\tposnegy-6\\tdfrmtxtLeft180\\tdfrmtxtRight180\\
trftsWidth3\\trwWidth5140\\trftsWidthB3\\trftsWidthA3\\trpaddl115\\trpaddr11
5\\trpaddfl3\\trpaddft3\\trpaddfb3\\trpaddfr3\\tbllkhdrrows\\tbllklastrow\\t
bllkhdrcols\\tbllklastcol   \\clvertalc\\clbrdrt

     \\brdrs\\brdrw30   \\clbrdrl\\brdrs\\brdrw30
\\clbrdrb\\brdrs\\brdrw30
\\clbrdrr\\brdrs\\brdrw30
\\clcbpat17\\cltxlrtb\\clftsWidth3\\clwWidth2609\\clcbpatraw17
\\cellx2494\\clvertalc\\clbrdrt\\brdrs\\brdrw30
\\clbrdrl\\brdrs\\brdrw30
\\clbrdrb\\brdrs\\brdrw30 \\clbrdrr\\brdrs\\brdrw30


\\clcbpat17\\cltxlrtb\\clftsWidth3\\clwWidth2531\\clcbpatraw17
\\cellx5025\\pard\\plain \\qc
\\li0\\ri-103\\widctlpar\\intbl\\tx1575\\pvpara\\phpg\\posx2405\\posnegy-6\\
dxfrtext180\\dfrmtxtx180\\dfrmtxty0\\aspalpha\\aspnum\\faauto\\adjustright\\
rin-103\\lin0\\pararsid9326325\\yts16


\\fs24\\lang1033\\langfe1033\\cgrid\\langnp1033\\langfenp1033
{\\b\\f38\\cf8\\insrsid9326325 Profile
Name}{\\b\\f38\\cf8\\insrsid9326325\\charrsid12210558
\\cell
}{\\b\\f38\\cf8\\insrsid9326325
Position}{\\b\\f38\\cf8\\insrsid9326325\\charrsid12210558
  \\cell }


     I bolded the actual data that should be in there.
Now this is just the
first row of the table that is the Header. Can anyone
tell me whether I
parsed out these two cells the right way? If I can
figure this out I think
the rest of the rows should be exactly like this
right?

    Is there an easier way to create a table for rtf
via code? This isnt
going to be the only thing in the document. I have
about 31 other rtf files
that are going to be going in there, but they are
simple copy and paste.
This is the only code generated one.

Thanks and have a good day.


Steve Welborn
Software Engineer
BitWise Solutions
317.805.4376 x227
email:     [EMAIL PROTECTED]
website: http://www.bitwisesolutions.com




---------------------------------
Blab-away for as little as 1¢/min. Make  PC-to-Phone
Calls using Yahoo!
Messenger with Voice.

===================================
This list is hosted by DevelopMentor®
http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentor®
http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to