多列列表框 [英] Multi Column Listbox

查看:170
本文介绍了多列列表框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法,以一个泛型列表绑定到一个多列列表框,列表框是...我知道,但是这是我坚持并不能添加一个网格或列表视图。

Is there a way to bind a Generic List to a multicolumn listbox, yes listbox...I know but this is what I am stuck with and can't add a grid or listview.

感谢

推荐答案

您可以列表绑定到这样一个列表框:

You could bind a list to a listbox like this:

List<int> list = new List<int> { 1, 2, 4, 8, 16 };
listBox1.DataSource = list;

对于多列列表框文件说列表框。多列中只需要进行垂直滚动不必要的物品放置到尽可能多的列。

As for multicolumn listbox documentation says ListBox.MultiColumn only places items into as many columns as are needed to make vertical scrolling unnecessary.

如果你想显示的信息,其中一整行会都被选择,你可以使用的多列列表框通过克里斯·里卡德。

If you want to show several columns of information for which an entire row will get selected you could use Multi Column List Box by Chris Rickard.

这篇关于多列列表框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆