RichTextBox

B

BaligaN

Hi,

I need to read data from certain table and then save it to RTF file. I
thought up of using a RichTextBox and then "dumping" all the text into this
compoent at run time and use the "SaveFile" method. However, I would have to
"manipulate" the text that goes in to the rich text box. For exmable, I
would have to make certain text bold or appear in another column / row. Can
anyone suggest me a good way to acheive this please?

regards
Baliga
 
M

Moty Michaely

Hi,

I need to read data from certain table and then save it to RTF file. I
thought up of using a RichTextBox and then "dumping" all the text into this
compoent at run time and use the "SaveFile" method. However, I would have to
"manipulate" the text that goes in to the rich text box. For exmable, I
would have to make certain text bold or appear in another column / row. Can
anyone suggest me a good way to acheive this please?

regards
Baliga

Hi,

Since there isn't any RTF manipulation tool other than RichTextBox
in .NET (Not that I know of), I would suggest to do exactly what you
said: Pass the text into the RTB, manipulate the text and then save
the RTF text using the SaveFile method.

To manipulate text (bold for example) you should select the text to be
manipulated and use the Selection* methods.

rtb1.SelectionStart = 0;
rtb1.SelectionLength = 2;
rtb1.SelectionColor = Color.Blue;

Hope this helps.
Moty
 

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