如何绘制树形图 [英] How to draw a tree graph

查看:114
本文介绍了如何绘制树形图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含节点名称的表
表一包含节点之间的链接
我喜欢用户单击按钮进行查看

要查看树形图

图为二叉树

我应该使用什么以及绘制算法节点树及其关系的说明进行了明确定义

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


这篇关于如何绘制树形图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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