tonofsteel
Active member
- Joined
- Jul 10, 2003
- Messages
- 35
Why is there no way to print formatted rich text in a rich text box in VB.net. There is the PrintDocument class, and you can use the:
ev.Graphics.DrawString(line, printFont, Brushes.black, leftMargin, yPos)
but that does not include the background color. Its bad enough that Visual Studio .net does not even have a rich text box that can highlight text, but now there is no way to print it. Does anyone know how to print formatted RTF the way it appears on the screen, or can you only print one color one size text.
Am i going to have to read the properties of each character to determine the text color, and the font and size information, then use the drawstring, then draw a rectangle that is filled in around the line of text???? How do you do that?
ev.Graphics.DrawString(line, printFont, Brushes.black, leftMargin, yPos)
but that does not include the background color. Its bad enough that Visual Studio .net does not even have a rich text box that can highlight text, but now there is no way to print it. Does anyone know how to print formatted RTF the way it appears on the screen, or can you only print one color one size text.
Am i going to have to read the properties of each character to determine the text color, and the font and size information, then use the drawstring, then draw a rectangle that is filled in around the line of text???? How do you do that?