How to set space between items in a checked list b

2019-02-17 07:32发布

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

2条回答
甜甜的少女心
2楼-- · 2019-02-17 08:04

Looks like you could go with a ListView (which always always always ist the better choice anyway) and a (dummy) imagelist. See here and here.

Just tried it and it's really easy: Add an imagelist to your form; set its imagesize width to something small and its height to your liking and apply it as the listview's stateimagelist. No need for any actual images.

No need to go for tiles and you could add prices in a 2nd column, even with a different font.. ListView rules ;-)

Let us see the final result! Yumm!!

查看更多
再贱就再见
3楼-- · 2019-02-17 08:09

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.

查看更多
登录 后发表回答