我正在寻找关于自有树视图的好资源 [英] I am looking for a good resource on ownerdrawn treeviews

查看:27
本文介绍了我正在寻找关于自有树视图的好资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在绘制树视图时遇到问题.

I am running into problems with drawing my treeview.

设计目标:

Level 0 应该像没有复选框的默认值一样工作

Level 0 should work just like default with out checkboxes

级别 1 应该有复选框

Level 1 should have check boxes

Level 2 不应有复选框

Level 2 should not have check boxes

我在很大程度上能够创建这种行为,但我无法正确重绘某些部分:

I have for the most part been able to create this behaiviour but I am not able to get ome parts to redraw properly:

在第 0 级,正负缺失,并且

On level-0 the plusminus is missing and

c#、winforms、.net-2.0

c#, winforms, .net-2.0

在 Level-1 上,节点线丢失

on Level-1 the node lines are missing

在第 2 层,节点线丢失

on level-2 the node lines are missing

有没有人有类似的经验或者可以给我指点在线资源

does any one have any experiance with something similar or can point me to an online resource

推荐答案

完成 TreeView 的 ownerdraw 很困难.反射器成名的 Lutz Roeder 没有完全实现它是如此困难.太难了,连微软都放弃了.考虑 Windows 7 风格:

Complete ownerdraw of TreeView is hard. It is so hard that Lutz Roeder of Reflector fame didn't implement it fully. It is so hard that even Microsoft gave up on it. Consider the Windows 7 style:

注意展开节点的黑色三角形,折叠节点的空心三角形.美观,很容易自己实现,您的应用程序将自动准备好用于 Win7 外观.赢赢.

Note the black triangle for an expanded node, the hollow one for a collapsed node. Esthetically pleasing, very easy to implement yourself and your app will automatically be ready for the Win7 look. Win win.

这篇关于我正在寻找关于自有树视图的好资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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