C# ListView在List模式下调整Item宽度

发布于 2024-12-17 08:03:15 字数 432 浏览 1 评论 0原文

如何在显示为ListListView中设置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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

感情旳空白 2024-12-24 08:03:16

男孩,我觉得自己很愚蠢。

看来我定义了两列。一旦我删除了所有列定义,一切就都应该是这样。

Boy I feel stupid.

It appears that I had two columns defined. Once I removed all the column definitions all is as should be.

水波映月 2024-12-24 08:03:16

将名为 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文