protected override void Paint(System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle cellBounds, int rowIndex, DataGridViewElementStates dataGridViewElementState, object value, object formattedValue, string errorText, DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts) { base.Paint(graphics, clipBounds, cellBounds, rowIndex, dataGridViewElementState, value, formattedValue, errorText, cellStyle, advancedBorderStyle, paintParts); Point p = new Point(); Size s = RadioButtonRenderer.GetGlyphSize(graphics, System.Windows.Forms.VisualStyles.RadioButtonState.UncheckedNormal); p.X = cellBounds.Location.X + (cellBounds.Width / 2) - (s.Width / 2); p.Y = cellBounds.Location.Y + (cellBounds.Height / 2) - (s.Height / 2); _cellLocation = cellBounds.Location; radioButtonLocation = p; radioButtonSize = s; if (_checked) { _cbState = System.Windows.Forms.VisualStyles.RadioButtonState.CheckedNormal; } else { _cbState = System.Windows.Forms.VisualStyles.RadioButtonState.UncheckedNormal; } RadioButtonRenderer.DrawRadioButton(graphics, radioButtonLocation, _cbState); }
private System.Windows.Forms.VisualStyles.RadioButtonState GetRadioButtonState() { System.Windows.Forms.VisualStyles.RadioButtonState ret = System.Windows.Forms.VisualStyles.RadioButtonState.UncheckedNormal; if (!this.Enabled) { ret = System.Windows.Forms.VisualStyles.RadioButtonState.UncheckedDisabled; } else if (pressed) { ret = System.Windows.Forms.VisualStyles.RadioButtonState.UncheckedPressed; } else if (hot) { ret = System.Windows.Forms.VisualStyles.RadioButtonState.UncheckedHot; } if (this.Checked) { ret += 4; } return(ret); }
public static System.Drawing.Size GetGlyphSize(System.Drawing.Graphics g, System.Windows.Forms.VisualStyles.RadioButtonState state) { }
// Methods public static bool IsBackgroundPartiallyTransparent(System.Windows.Forms.VisualStyles.RadioButtonState state) { }
public static void DrawRadioButton(System.Drawing.Graphics g, System.Drawing.Point glyphLocation, System.Drawing.Rectangle textBounds, string radioButtonText, System.Drawing.Font font, TextFormatFlags flags, System.Drawing.Image image, System.Drawing.Rectangle imageBounds, bool focused, System.Windows.Forms.VisualStyles.RadioButtonState state) { }
public static void DrawRadioButton(System.Drawing.Graphics g, System.Drawing.Point glyphLocation, System.Windows.Forms.VisualStyles.RadioButtonState state) { }