Click here to Skip to main content
15,902,447 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi;
i really need help in drawing table.how i can create table with rows and columns in richtextbox??
Posted

1 solution

It is quite complicated, so you will need to look at the RTF specification[^] - don't know how good it is, but it should give you a clue on RTF format.

The easiest way to do it is to:
1) Create a table in a document in Word.
2) Save it as RTF.
3) Open the RTF in Wordpad.
4) Save it as a new document.

This strips out the miles of cr*p that Word adds, and leave a simpler document.

Copy the table data and insert it into the RTF in your app, via the RichTextBox.Rtf property. You can then modify the table and try again until you understand what the various file format parts do!

There is AFAIK no InsertTableToRtf method in a RichTectBox!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900