树节点图像叠加
我有一个大约 30 个图像的图像列表,当 TreeNode 处于特定状态时,我希望能够将 3 个图像叠加在 30 个图像的顶部。 我知道 C++ TreeItem 可以使用 TVIS_OVERLAYMASK 来做到这一点:
SetItemState(hItem,INDEXTOOVERLAYMASK(nOverlayIndex), TVIS_OVERLAYMASK);
Is there anymechanism to receivelike results in .NET?
I have an imagelist of about 30 images, and 3 images I'd like to be able to overlay on top of the 30 when a TreeNode is in a particular state. I know that a C++ TreeItem can do this with the TVIS_OVERLAYMASK as such:
SetItemState(hItem,INDEXTOOVERLAYMASK(nOverlayIndex), TVIS_OVERLAYMASK);
Is there any mechanism to achieve similar results in .NET?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我发现这个问题仍然有很多人关注,所以我将发布大卫建议的实施情况。
I see this question is still getting views, so I'll post the implementation of what David suggested.
为什么不直接按需生成带有叠加层的图像,这样就不必像这样浪费宝贵的 CPU 周期:
http://madprops.org/blog/highlighting-treenodes-with- an-overlay-image/ :
Why don't you just generate the image with the overlay on demand even, so you don't have to waste precious CPU cycles like this:
http://madprops.org/blog/highlighting-treenodes-with-an-overlay-image/ :
我不知道如何自动进行覆盖,但您可以使用所有者绘制的树节点来完成此操作。
I don't know of a way to do the overlay automatically, but you could do this with an owner drawn tree node.