Event PrintPage

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I would like to create a PrintDocument which shows my data in a designed
table: but how can I design a table in my PrintDocument??How can I measure
the columns' length according to the contents, so that it looks like a table??

Here is an example of my PrintDocument:

Name | Surname | Adress
-------------------------------------
Sue | Smith | Point st.
Willi | Norton | Aven st.
etc...
...


Besides, why this escape value "\t" doesn't work?? it should print a tab,
but it isn't true.

Thanks
 
Siu said:
I would like to create a PrintDocument which shows my data in a designed
table: but how can I design a table in my PrintDocument??How can I measure
the columns' length according to the contents, so that it looks like a
table??

'Graphics.MeasureString'.
 
Siu,

You can either use Graphics.MeasureString to get the length of the text of a
piece of text you want to print with the font and pointsize in use or simply
use a font such as Courier in which every character prints with the same
width. In the latter case it is easy to draft the result on paper and count
the character columns.
Nigel B
 
Back
Top