如何绘制树形图
问题描述:
我有一个包含节点名称的表
表一包含节点之间的链接
我喜欢用户单击按钮进行查看
要查看树形图
图为二叉树
我应该使用什么以及绘制算法节点树及其关系的说明进行了明确定义
I have a table containing the node name
Table I contains a link between nodes
I like when the user clicks on the button to view
To see the tree graph
Graph as a binary tree
What should I use as well as instructions for drawing the tree of the algorithm nodes and their relationship is clearly defined
答
此 ^ ]可能会为您提供帮助.
This link-MSDN-[From tree to Graph][^] might help you.
如果您可以将节点链接结构表示为二叉树:那么:我们可以假设您只在处理二叉树吗?
如果是这种情况,某种形式的Treeview控件(在WPF的WinForms中,或其他任何形式)是一种将二进制树的图形模型快速获取到UI的真正简便方法.
即使包含多个二叉树的集"(断开连接的节点集)也可以由Panel中的多个TreeView建模,或者类似水平扩展的手风琴"样式控件之类的模型……尽管:我不是暗示您应该这样做.
If you can express your node-links structure as a binary tree: then: can we assume you are only dealing with binary trees ?
If that''s the case, some form of Treeview Control (in WinForms of WPF, or whatever) is a real easy way to get a graphic model of a binary tree into a UI quickly.
Even a "set" containing multiple binary trees (dis-connected node sets) could be modeled by multiple TreeViews in a Panel, or something like a horizontally expanding ''accordion'' style control ... although: I am not implying you should do that.
您能举一个例子吗?
一个示例...演示我该怎么做...用于绘图
而且这只是一个二叉树
带有根节点的节点可以更多
我想要表格:winpp winform
can you give me one example?
one example ...demo how can i do it ... for Drawing
and This is only a binary tree
With a root node and nodes can be more
i want it for forms: winpp winform