汽车宽度的ListView控件 [英] Auto widths in ListView

查看:164
本文介绍了汽车宽度的ListView控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何设置根据其在ListView内容的长度每列的宽度是多少?我讨厌不得不不断地改变每个列的大小在运行时。是否有一个MSDN文档有这个信息?我找不到在哪里我应该寻找

How can we set the width of each column according to the length of its content in a ListView? I hate having to keep changing the size of each column at runtime. Is there an MSDN doc that has this info? I can't find where I should be looking

感谢您

推荐答案

查看ColumnHeader.AutoResize()方法。填充项目后调用它,表单的OnLoad()方法是第一次机会。

Review the ColumnHeader.AutoResize() method. Call it after populating the Items, the form's OnLoad() method is the first chance.

这篇关于汽车宽度的ListView控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆