ListBox和ListView之间的区别

编程入门 行业动态 更新时间:2024-10-22 18:26:36
本文介绍了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之间的区别

本文发布于:2023-11-03 15:04:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1555425.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:区别   ListBox   ListView

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!