Search code examples
c#winformscheckedlistbox

How to set space between items in a checked list box?


I'm developing a windows form application using c#. How can I set a space between items in a checked list box?

enter image description here


Solution

  • You can't, increasing the font size is all you got. Not exactly a control that's suitable for a touch screen. You can re-implement it with ListBox.DrawMode and ControlPaint.DrawCheckBox().

    The better selection here is a ListView with View = Tile, easy to hit with your thumb when you make the tile big enough. You can't use ListView.CheckBoxes anymore, using an icon is a good choice. Also automatically takes care of the user only selecting one item.