本文介绍了ListBox和ListView之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
两者之间有什么区别?
What is the difference between it? It seems same to me.
推荐答案看看类继承层次结构- ListVIew Have a look at the class inheritance hierarchy - ListVIew System.Object System.MarshalByRefObject System.ComponentModel.Component System.Windows.Forms.Control System.Windows.Forms.ListView
列表框
ListBox
System.Object System.MarshalByRefObject System.ComponentModel.Component System.Windows.Forms.Control System.Windows.Forms.ListControl System.Windows.Forms.ListBox Microsoft.VisualBasic.Compatibility.VB6.DirListBox Microsoft.VisualBasic.Compatibility.VB6.FileListBox System.Windows.Forms.CheckedListBox可以使用四个不同视图之一显示ListView .
A ListView can be displayed using one of four different views.
ListView控件用于显示数据源中的值.它类似于GridView控件,不同之处在于它使用用户定义的模板而不是行字段来显示数据.创建自己的模板可为您提供更多控制数据显示方式的灵活性. ListView与Windows资源管理器列表完全一样,允许查看图块,详细信息和图标. ListView还允许其他属性,例如每个项目的唯一颜色和复选框. ListBox更加简单,只有垂直列表. The ListView control is used to display the values from a data source. It resembles the GridView control, except that it displays data by using user-defined templates instead of row fields. Creating your own templates gives you more flexibility in controlling how the data is displayed. The ListView is exactly like the Windows Explorer lists, allowing views for tiles, detail, icons. ListView also allows other properties like unique colors for each item, and checkboxes. ListBox is much simpler, vertical only list.
更多推荐
ListBox和ListView之间的区别
发布评论