all groups > dotnet windows forms > january 2005 >
You're in the

dotnet windows forms

group:

Event PrintPage


Event PrintPage Siu
1/31/2005 7:39:09 AM
dotnet windows forms:
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.

Re: Event PrintPage Herfried K. Wagner [MVP]
1/31/2005 5:05:36 PM
"Siu" <Siu@discussions.microsoft.com> schrieb:
[quoted text, click to view]

'Graphics.MeasureString'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Re: Event PrintPage Nigel B
2/3/2005 4:39:02 AM
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

[quoted text, click to view]
AddThis Social Bookmark Button