|
#1
|
|||
|
|||
I need help trying to print a single multiline textbox onto a sheet of plain paper. I can print the textbox to the paper and it prints fine as a single line. The problem is when I go into properties and set the textbox for multiline and I hit the green run button at the top of the page. The textbox picks up the data from the database fine and the multilined textbox on the screen works fine each word goes to a new line. It is just when I go to print.document the text only comes out in a single line on the plain paper. I want each word to print on a new line on the plain paper. what is the easist way to word wrap this text within the textbox to the printer. What code ideas do you have that I may try. I am using VB.NET 2008. I am creating a windows application. I am using the printdocument control. |
|
#2
|
|||
|
|||
|
multiline textbox to printdocument
To better discribe what I am trying to do starting with what shows up on the desktop.
1. I open a new FORM1 IN VB 2008 2. I first drag a Button1 on to the form 3. Next I drag a TextBox1 on to the form 4. I then go to the properties for the textbox and set the MultiLine = True and the Size = 32, 62 5. I then bind the DataBase I am using to the textbox 6. The feild in the database has some data that looks like this: KF 123 O456 1972 7. I then hit Run at the top of VB and when theprogram runs the data in the textbox looks like this: KF 123 O456 1972 This is how I want the data in the textbox on the desktop to look and the problem I am having is to get the data in step 7. to print out the same way but right now it is printing out like step 6. on the printer. I am using PrintDocument and puting the code in Button1. I am using Graphics.DrawString in my code if you would like to see the code I could send it later tonight |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| word wrap - multiline textbox to printer | COMPCAD | .NET | 4 | 10-21-2009 04:20 PM |
| Search for strings in multiline textbox | sam510 | VB Classic | 1 | 12-17-2007 07:54 AM |
| Multiline textbox, scrolling to a Line and editing Line | guptan | .NET | 1 | 07-07-2006 06:37 AM |
| MultiLine TextBox | Piyush Gupta | VB Classic | 18 | 07-20-2001 03:42 PM |
| MultiLine TextBox | Piyush Gupta | VB Classic | 0 | 07-19-2001 01:16 AM |