Tab Characters in PrintPreview

  • Thread starter Thread starter Mr Tired
  • Start date Start date
M

Mr Tired

I am not able to preview the tabstops in the print preview option. I am
not able to see the effect of the tabstop in the print out put either.

help me before I crazy.

Cheers,
 
Tab characters don't move to a defined tab position in a PrintDocument. You
will need to parse out the strings and locate them in your code.

Ron Allen
 
Mr Tired said:
I am not able to preview the tabstops in the print preview option. I am
not able to see the effect of the tabstop in the print out put either.

Instead of using tabs, use multiple calls to 'DrawString' with appropriate X
coordinate.
 
Mr Tired said:
So should I replace the tabstops with spaces?

\\\
Const TabstopWidth As Integer = 22
Dim Line As String = ...
Dim CurrentX As Integer
For Each Column As String In Split(Line, ControlChars.Tab)
e.Graphics.DrawString(Column, Me.Font, Brushes.Black, CurrentX, 100)
CurrentX += TabstopWidth
Next Column
///
 

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

Back
Top