gpt4 book ai didi

c# - 在 Windows 应用程序 ListView 控件中包装项目

转载 作者:太空宇宙 更新时间:2023-11-03 18:43:05 26 4
gpt4 key购买 nike

有没有办法让长项在 .net windows 窗体应用程序中换行,我已经将 LabelWrap 设置为 true,但它不起作用,我正在使用 Details View Type,

谢谢

最佳答案

ListView 不允许文本换行。

在这种情况下,我通常做的是将“ShowItemToolTips”属性设置为 true。然后用户可以看到整个文本的工具提示。这是我在 ListView 中看到的唯一可以在这种情况下提供帮助的简单选项。

如果您真的想支持文本换行,则必须使用第三方 ListView 或 DataGridView。

编辑如果您使用的是 VS2010,Tile View是您的一个选择。

With the tile view feature of the ListView control, you can provide a visual balance between graphical and textual information. The textual information displayed for an item in tile view is the same as the column information defined for details view. Tile view works in combination with either the grouping or insertion mark features in the ListView control.

关于c# - 在 Windows 应用程序 ListView 控件中包装项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6978221/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com