Click here to Skip to main content
15,887,355 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there a way to resize a panel with its content when printing onto a specific page size?

The page size that i had set is 6 by 4 inches, I tried about designing it individually onto the page but it took a lot of time. Is there a way to design it easier instead of doing it one by one or resizing the panel when printing?

What I have tried:

I had tried using drawstring but I have too many components in the panel, that designing it one by one would take a lot of time.
Posted
Updated 8-Nov-21 22:56pm
Comments
CHill60 9-Nov-21 4:55am    
For the components within the panel just use anchoring, then the only thing that needs resizing is the panel

1 solution

Basically, don't print panels directly.
Instead, use the PrintDocument class[^] and you get full control over what you print, where, and at what size.

If you have the info on a panel, it shouldn't be too difficult to work through it's Controls collection extracting the information and printing it. Printing panels directly is a PITA as you only ever get what is currently displayed, using "display friendly" font sizes and so on which can vary between two different computers rendering your print useless.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900