Table format in a RichTextBox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!

Is there any posibility for me to present data in a richtextbox as a table?

I'm using VS .NET 2003 (.NET 1.1) for developing our windows application.
I wish to present data in RichText format because it's easy to copy and
paste into other documents or archives.
 
In my eager I posted my question before it was finnished....

:-)

It, is easy to create a table in a word-document. it is also easy copy and
paste this table with content into a rtf document. I've also tried to paste
this table into a RichTextBox ... with success.

I wish to create a table and present it in a RichTextBox programaticaly, as
the test above. Is this possible and how do I proceed? Any tips or help
will be appreciated.

Best regards
Hans Årsjö
 
Using the link (from previous post) as reference material, perhaps
(after pasting into the RichTextBox) simply inspect the .Rtf property
of the RichTextBox; this should allow you to see which control-codes
to use. Now use that as a starting point to output your own
cotrol-codes (i.e. to a StringBuilder), and then set the .Rtf value of
the RichTextBox to show your very own table.

For inspecting the .Rtf, I recommend writing it to disk using
SaveFile(...) - don't try reading in the IDE as it is too long.

Marc
 
Thank you for your quick relpy.

Your help was invaluable :-) I'm know a big step further in satisfying our
customers.

--
Best regards
Hans Årsjö
System and software developer
DiaGraphIT AS
www.diagraphit.com
 

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

Back
Top