C# ListView在List模式下调整Item宽度
如何在显示为List
的ListView
中设置Item的长度?
数据集是字符串列表。我不需要专栏。我需要能够更改字符串字体,所以我想 ListView
就是我需要使用的。
我已使用 VS 设计器在我的应用程序中放置了一个 ListView
控件,但在使用 Items.Add()
插入项目后,添加的项目未完全显示,例如:abc...
,当控件有足够的宽度以允许显示整个项目文本时。
如何设置项目宽度,使其不会被句点截断?
它看起来是这样的: http://i44.tinypic.com/dyvl1t.jpg
How to set Item's length in a ListView
that is displayed as List
?
The data set is a list of strings. I don't need columns. I need to be able to change the strings font so I guess ListView
is what I need to use.
I've placed a ListView
control in my application using VS designer but after inserting an item using Items.Add()
the added item is not displayed fully, ex: abc...
, when there is enough width to the control to allow for entire item text to be displayed.
How do I set item width so that it's not cut off with periods?
Here is what it looks like:
http://i44.tinypic.com/dyvl1t.jpg
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
男孩,我觉得自己很愚蠢。
看来我定义了两列。一旦我删除了所有列定义,一切就都应该是这样。
Boy I feel stupid.
It appears that I had two columns defined. Once I removed all the column definitions all is as should be.
将名为 View 的 ListView 属性设置为 List。
有多种视图可以查看列表视图的数据。您可以通过设置各种视图属性来更改它。
在您的情况下,您必须将其设置为列表。
Set ListView property named View to List.
There are various view to see data of listview. You can change it by setting various View property.
In your case you have to set it to List.