I have a checkbox column in my .net core Winform data GridVew.
I already made the checkbox bigger to be easier for the user to click.
My code inside CellPainting,
e.PaintBackground(e.CellBounds, true);
ControlPaint.DrawCheckBox(e.Graphics, e.CellBounds.X + 1, e.CellBounds.Y + 5,
e.CellBounds.Width - 10, e.CellBounds.Height - 10,
(bool)e.FormattedValue ? ButtonState.Checked : ButtonState.Normal);
e.Handled = true;
Those are my reference links,
How to change checkBox Size in DatagridviewCheckboxCell
Increase the size of Checkbox in #DataGridView in C#
The result is like below,
But the problem is the click area, even though the size of the checkbox is bigger, I realize the clickable area is still in its original size.
As I show below, the green area is clickable area,

I want to make the clickable area as big as the checkbox's size as show below,

Is there any solution?

When you mouse-click a
DataGridViewCheckBoxCellto toggle the Checked state, you have to click on the content within the cell, clicking on elsewhere within the cell does not change a thing. The content of aDataGridViewCheckBoxCellis that small box area. So, just drawing a bigger box does not resize or reposition (according to the column'sDefaultCellStyle.Alignment) that content area and it remains the same. You need to code for that to tell, the content area has been clicked and the relevant base methods and events should be invoked.I'd create custom
DataGridViewCheckBoxcolumn and cell to apply this requirement.Within your project's namespace, derive a new class from
DataGridViewCheckBoxColumn:And another one derived from
DataGridViewCheckBoxCell:Rebuild and check out the new column type in the grid's designer.
In case you have a data-bound grid, set the
AutoGenerateColumnsproperty tofalseand add the columns manually. For example: