我什么时候应该为虚拟 ListView 调用 AutoResizeColumns?
我正在详细信息模式下设置一个虚拟 ListView
,并且我希望其列自动调整大小,以免截断当前可见项目的文本。
调用 AutoResizeColumns 效果很好(至少看起来是这样,因为文档并不清楚该函数在虚拟模式下会发生什么);同样,双击列标题也可以正常工作。
但是,我不知道何时调用 AutoResizeColumns
方法:在 RetrieveVirtualItem
事件处理程序末尾不起作用,因为调用 AutoResizeColumns 还会触发 ListView 的刷新。
你能给我一些指点吗?
I'm setting up a virtual ListView
in details mode, and I'd like its columns to automatically resize so as to not truncate the text of the currently visible items.
Calling AutoResizeColumns
works great (at least it looks like it does, since the documentation is rather unclear on what happens in this function in virtual mode); similarly, double-clicking the column header works correctly.
What I don't know, however, is when to call the AutoResizeColumns
method: at the end of the RetrieveVirtualItem
event handler doesn't work, since calling AutoResizeColumns
also triggers a Refresh
of the ListView.
Could you give me a few pointers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论