System.Windows.Forms.ColumnHeader 可以使用与主 ImageList 不同的图像吗?
我设置了一个 ListView 来排序,并且运行良好。
但是,当 ListView 排序时,不会提供有关当前排序列和顺序的指示。
我尝试了一种在排序时设置 ColumnHeader.ImageKey 属性的解决方案,但我希望能够使用不是 ListView 的 SmallImageList 指定大小的图像。
有什么方法可以在不使用 OwnerDraw 模式的情况下实现此目的吗?
I have an ListView set up to sort, and I have that working well.
However, when the ListView is sorted, no indication is provided as to the current sort column and order.
I tried a solution setting the ColumnHeader.ImageKey property whenever sorting, but I want to be able to use images that aren't the size specified by the ListView's SmallImageList.
Is there any way to do this without using OwnerDraw mode?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为没有 OwnerDraw 就无法做到这一点。 然而,OwnerDraw 并不像您想象的那么糟糕。 CodeProject.com 上有很多示例; 就像这个和这个
I don't think you can do it without OwnerDraw. However, OwnerDraw isn't as bad as you might think. There are many examples on CodeProject.com; like this and this