OnPaint method has a System.Windows.Forms.PaintEventArgs parameter. This is
a general paint method for the whole control including its label, checkbox
and background. The ClipRectangle property shows the boundaries of the
whole control, if this is the first time the control is being painted, or
just the area of the checkbox if it is being repainted. So in the OnPaint
method do I need to do the following?:
1. First call MyBase.OnPaint, so that the checkbox is drawn as it normally
would.
1. Figure out the exact location of the checkbox based on the
ClipRectangle property.
2. Paint that location to the color I want.
3. Draw the check mark on that location if the checkbox is checked.
Am I going in the right direction? It feels like there must be an easier
way of doing this.
Thanks for any help.
Elif