c# Checkedlistbox Multicolumn

时间秒杀一切 提交于 2019-11-29 14:40:43

Although CheckedListBox has MultiColumn property and you can set it to true, but it only arranges list of items in multiple columns flowing items top to down then right, based on height of control

■ 1         ■ 5
■ 2         ■ 6
■ 3         ■ 7
■ 4

So if you really need multiple column, consider using DatGridView or ListView that are real multi column controls.

Setting the MultiColumn property to true doesn't allow you to add more columns manually. It just 'wraps' items to the next column instead of showing a vertical scrollbar once the items exceed the height of the CheckedListBox.

If you want a two column control, either use a grid control of some kind or a ListView control. By setting a ListView control's View property to View.Details, you can use it as a multicolumn 'grid'.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!