System.Windows.Forms.ThemeWin32Classic.DrawCheckBox C# (CSharp) Method

DrawCheckBox() public method

public DrawCheckBox ( Graphics g, CheckBox cb, Rectangle glyphArea, Rectangle textBounds, Rectangle imageBounds, Rectangle clipRectangle ) : void
g System.Drawing.Graphics
cb CheckBox
glyphArea System.Drawing.Rectangle
textBounds System.Drawing.Rectangle
imageBounds System.Drawing.Rectangle
clipRectangle System.Drawing.Rectangle
return void
		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);
		}

Same methods

ThemeWin32Classic::DrawCheckBox ( Graphics dc, Rectangle clip_area, CheckBox checkbox ) : void
ThemeWin32Classic