如何在c#中自定义树视图? [英] How to customize tree view in c#?
问题描述
我在c#中使用Windows窗体应用程序..
我有一个数据树,现在我想更改树的默认布局,因为我正在尝试制作这样的族树(不包括母亲或妻子。
I am using windows form application in c#..
I have a tree with data now i want to change the default layout of the tree because i am trying to make a family tree like this(Mother or wife not included).
A
|
---------------------
| | |
B D C
|
--------------------
| |
E F
|
--------------------------------
| | | |
G H I J
任何人都可以帮助我...
Can anyone help me...
推荐答案
如果你是指一个家谱,如
If you mean a family tree as in
A
|
--------------------- ----...
| | | |
B C D - E
|
|
|
F
然后你无法自定义TreeView来实现这一点 - 它是一个完全不同的组织,你需要一个完全不同的组织。
您可能可以在Google上找到某些内容,或者您可能需要创建自己的内容。当然,我不知道你可以使用现成的。
Then you can't customise a TreeView to do that - it's a totally different organisation you need, and a totally different control.
You may be able to find something on Google, or you may have to create your own. Certainly, I don't know of one you could use off the shelf.
看看类似的问题:如何在数据库的报告中创建族树。 [ ^ ]
Have a look at similar question: how to create Family tree in report from database.[^]
这篇关于如何在c#中自定义树视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!