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

3

6

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

Bizet answered 9/3, 2014 at 8:2 Comment(1)
Please, do not include information about a language used in a question title unless it wouldn't make sense without it. Tags serve this purpose.Omni
E
6

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.

Electrothermics answered 9/3, 2014 at 8:39 Comment(0)
C
1

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!!

Culpepper answered 9/3, 2014 at 9:32 Comment(0)
D
0

Under the Behavior Properties, look for ColumnWidth

Dilution answered 5/5, 2021 at 3:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.