public override void DrawCheckBox (Graphics g, CheckBox cb, Rectangle glyphArea, Rectangle textBounds, Rectangle imageBounds, Rectangle clipRectangle)
{
// Draw Button Background
if (cb.Appearance == Appearance.Button && cb.FlatStyle != FlatStyle.Flat)
ButtonBase_DrawButton (cb, g);
else if (cb.Appearance != Appearance.Button)
DrawCheckBoxGlyph (g, cb, glyphArea);
// Draw the borders and such for a Flat CheckBox Button
if (cb.Appearance == Appearance.Button && cb.FlatStyle == FlatStyle.Flat)
DrawFlatButton (g, cb, textBounds, imageBounds, clipRectangle);
// If we have an image, draw it
if (imageBounds.Size != Size.Empty)
DrawCheckBoxImage (g, cb, imageBounds);
if (cb.Focused && cb.Enabled && cb.ShowFocusCues && textBounds != Rectangle.Empty)
DrawCheckBoxFocus (g, cb, textBounds);
// If we have text, draw it
if (textBounds != Rectangle.Empty)
DrawCheckBoxText (g, cb, textBounds);
}