How to display/edit formatted text from a database?

P

Phil

Hi All!

What is the most recommended way of displaying formatted
text from a database and allowing users to edit and save
it back to the database?

I guess, RichTextBox control will do the job, but I was
not able to display multi-line table rows properly in the
RichTextBox control [although they display just fine in
Word(Pad)]:

http://communities.microsoft.com/newsgroups/previewFrame.a
sp?
ICP=msdn&sLCID=us&sgroupURL=microsoft.public.dotnet.framew
ork.windowsforms&sMessageID=%253C06fd01c3ad0c%
2524e4d8c490%[email protected]%253E

i.e., instead of

+---+
| A |
+---+
|AAA|
|AAA|
|AAA|
+---+

I am getting

+---+
| A |
+---+
|AAA|AAAAAA
+---+


What gives? Hopefully, there is an alternative to Word
automation, because I do not want my application to
depend on Word.

Phil
 
J

Jon Paugh

Take a look at what characters are being used for end of
line markers in the text. You might be able to replace the
characters with the appropriate characters using regular
expressions and then the control would show the data
correctly? Not sure exactly what's going on but it
probably has to do with EOL characters...
 
P

Phil

Thanks,

But control words \intbl, \cell, and \row are properly
set in the RTF file I used.

Phil
 

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