Checkedlistbox多列 [英] Checkedlistbox Multicolumn
问题描述
我在Windows窗体中有一个CheckedListBox
控件.
I have a CheckedListBox
control in Windows Forms.
我想知道是谁向其添加多列.
MultiColumn
属性设置为true.
我只想知道添加2列的编码.
I want to know who to add multi-columns to it.
The MultiColumn
property is set to true.
I just want to know the coding to add 2 columns.
我的代码是
while (true)
{
data = SDK.GetNext("ACCHISTL", 6);
document_details = data.Split('|');
if (document_details[0] == "0")
{
if (document_details[3] == Document_nr)
{
lbLines.Items.su(document_details[4] + " -> " + document_details[14],true);
}
else
{
break;
}
}
else
{
break;
}
}
您能帮我看看正确的方法吗?
Can you please assist me on show me the correct way of doing this?
推荐答案
尽管CheckedListBox
具有MultiColumn
属性,您可以将其设置为true,但是它仅将项目列表排列在多列中,从而使项目自上而下流动,然后正确,基于控制高度
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
因此,如果您确实需要多列,请考虑使用真正的多列控件DatGridView
或ListView
.
So if you really need multiple column, consider using DatGridView
or ListView
that are real multi column controls.
这篇关于Checkedlistbox多列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!