如何使用 ObjectListView 对列中的文本进行自动换行
比如我有一句大话:
“我喜欢吃馅饼,整天在家里玩得很开心!” 我希望它看起来像这样:
“我喜欢吃馅饼并且有 房子周围充满乐趣 一整天!”
在这篇文章中: WinForms ListView 上的多行列表项控制?语法说你只需要打开WordWrap,但我找不到该选项,
感谢您的高级帮助。
For example I have a big sentence:
"I like to eat pie and have fun around the house all day long!"
And I want it to appear like this:
"I like to eat pie and have
fun around the house all
day long!"
In this post: Multi-line list items on WinForms ListView control? Grammarian said that you only need to have WordWrap on but I cannot find that option.
Thanks for the help in advanced
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
每列都有一个
WordWrap
属性。将其设置为true
并且该列的文本将换行。请记住,列表必须是 OwnerDrawn 才能使包装可见。
编辑:我今天又看了一遍,你说得很对——那个财产已经消失了!我不知道它消失到哪里了。我确信它曾经在那里:(
OLVColumn
应该有一个像这样的属性:将其放入,您将能够自动换行列的内容。
Each column has a
WordWrap
property. Set that totrue
and the text of that column will wrap.Remember, the list must be OwnerDrawn for the wrapping to be visible.
EDIT: I looked again today, and you are quite right -- that property has gone! I have no idea where it has vanished to. I'm sure it used to be there :(
OLVColumn
should have a property like this:Put that in, and you'll be able to word wrap your column's contents.