|
-
Nov 2nd, 2005, 03:21 PM
#1
printing text center aligned
I have not used the printing functions of .NET because I have not had a need to. But now I do so I am wondering what is the best way to print text center aligned on a page.
I am using printdialog and printdocument components on the form, and I have most of the details worked out, but much of the text to be printed needs center alignment
when I use the graphics objects DrawString method, I am using a RectangleF for the location, and basically what I am doing is making the rectangle the width of the page, and passing a StringFormat object with its Alignment property set to center
This is similar to making a label on a form the full width of the form, and making the text center aligned.
Is this the best way to do this? or is there an easier way?
for some basic testing, it appears I also need to compensate for the margins.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|