PrintDocumentControl; Printing Text Doesnt Wrap? Please Help...

MCCCStudent

New member
Joined
Jul 10, 2005
Messages
1
Programming Experience
Beginner
I have this simple code to print the value of a textbox...

VB.NET:
Private Sub prtDocument_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles prtDocument.PrintPage
        Dim sngPrintX As Single
        Dim sngPrintY As Single
        sngPrintX = e.MarginBounds.Left
        sngPrintY = e.MarginBounds.Top
e.Graphics.DrawString(txtSelectedSADescriptions.Text, New Font("Times New Roman", 12), Brushes.Black, sngPrintX, sngPrintY)
    End Sub

Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click
        prtDocument.Print()
End Sub
but when the page prints the text continue in one long line passing off the page and not continuing to print.

Example: I might have this in the text box..

"Text and more text. Text and more text. Text and more text. Text and more text. Text and more text. Text and more text. Text and more text. Text and more text. Text and more text. Text and more text. Text and more text. Text and more text. Text and more text. Text and more text. Text and more text. Text and more text.Text and more text."

but the page looks like

----------------------------------------------------

Text and more text.Text and more text.Text and more














------------------------------------------------------

Is there a way to make it wrap or anythng of that nature?

Thanks for the help,

MCCCSudent
 
Back
Top