DataGridView ButtonColumn question

0
0

Is there anyway I can pad a button column so that there is a space around the button image in a DataGridView button column?

If so, could you give me an example?

Thanks,
Gareth

  • You must to post comments
0
0

Padding in the button or padding in the cell to increase the space around the button?

If you are using the DataGridViewButtonColumn you can set the Padding in the column.DefaultCellStyle. It applies to all the cells. Or you can set the Padding of each cell’s Style.

If you want to increase the space around the button, it’s a theme property since the buttons on DataGridViewButtonColumn are not actually button controls. Cells are rendered as HTML content. Try with the Theme Builder,  you can set the margin property and reduce the height of the buttons usnig “calc(100% – 10px)”, if the margins are 5.

 

 

Attachment
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.