The RichTextBox produces multiple lines if the text from
its Text property is too long. Now I would like to be
able to print that text so that it is multilined like
that shown in the RichTextBox. I tried using a non-
visible RichTextBox in my printing application:

taskdescription.Text = "dkfj dfjoeij
eoijfeoifjdjdifdjdoifjdfoij eoirerijofj eiojfefijf
kdfjdfjoiejrijr jdfd.eoijeroj djfkdoeririoeroe";
for (int j=0;j<taskdescription.Lines.Length;j++){
e.Graphics.DrawString
(taskdescription.Lines[j],
new Font
("Arial",9),Brushes.Black,LEFT_MARGIN+DESCRIPTION_LEFT_MAR
GIN,TOP_MARGIN + TOP_BAND + TOP_DESCRIPTION_HEIGHT +
j*TASK_HEIGHT + i*CELL_HEIGHT);}

It would be appreciated if an alternate way can be
pointed out that works.

Thanks,

Brad

Re: Printing content of a RichTextBox by hirf-spam-me-here

hirf-spam-me-here
Wed Nov 26 11:48:36 CST 2003

* "Brad Huff" <anonymous@discussions.microsoft.com> scripsit:
> The RichTextBox produces multiple lines if the text from
> its Text property is too long. Now I would like to be
> able to print that text so that it is multilined like
> that shown in the RichTextBox. I tried using a non-
> visible RichTextBox in my printing application:

Getting WYSIWYG Print Results from a .NET RichTextBox
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/wnf_RichTextBox.asp>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>