Click here to Skip to main content
15,912,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how do i reflect the box of checkbox when i printpreview it? Thanks

What I have tried:

So this is my code, i used drawstring and .text on checkbox and it only reflect the text of checkbox. i don't know what are the other functions that needed to use for that, please help me, thanks.

e.Graphics.DrawString("" + checkBox1.Text, new Font("Century Gothic", 12, FontStyle.Regular), Brushes.Black, new Point(25, 250));
Posted
Updated 22-Aug-19 21:18pm
Comments
Maciej Los 23-Aug-19 3:08am    
Have you seen this thread?

1 solution

If you mean you want to show the checked state, then you need to specify that:
C#
e.Graphics.DrawString($"{checkBox1.Text} : {checkBox1.Checked}", new Font ...
 
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