TreeView控件 [英] TreeView control

查看:73
本文介绍了TreeView控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个表单,以便我可以在一列中显示高级别(Sam的所有报告,直接和间接),而不必使用代码......我希望单独的表结构将允许这种灵活性...有没有人知道我可以仔细阅读的任何现有例子???

I am trying to create a form so that I can display a high level down to a low level in one column (ALL of Sam''s reports, direct and indirect) without having to use code...I am hoping table structure alone will allow this flexibility...does anyone know of any existing examples I could peruse to help???

推荐答案

在我看来你需要一个自我相关的表格如:


ID

IDofParent

FieldX


现在你可以把这张表放在例如4次,从第一个IDofParent连接到第二个ID,第二个IDofParent连接到第三个ID,等等。


这需要最多级别,但是没有代码是可行的。

然而,一般的方法是使用树控制,但这需要先进的VBA技能....


Nic; o)
Looks to me you need a self-related table like:

ID
IDofParent
FieldX

Now you can place this table e.g. 4 times and connect from the first the IDofParent to the ID of the second, the IDofParent of the second to the ID of the third, etc.

This does require a max of levels, but is doable without code.
The general approach would however bee to use a tree control, but that required advanced VBA skills....

Nic;o)



我正在尝试创建一个表单,以便我可以在一列中显示低级别的高级别(ALL Sam的报告,直接和间接),而不必使用代码...我希望单独的表结构将允许这种灵活性...有没有人知道任何现有的例子,我可以仔细阅读帮助???
I am trying to create a form so that I can display a high level down to a low level in one column (ALL of Sam''s reports, direct and indirect) without having to use code...I am hoping table structure alone will allow this flexibility...does anyone know of any existing examples I could peruse to help???



正如Nico所说,TreeView Control会在表格上以图形方式显示这个层次结构,我们也可以保持其语法尽可能简单。给我一个定义了所有级别的数据的样本子集,我将为您发布代码。一旦你看到它,我肯定你将能够填补空白。

A TreeView Control would, as Nico stated, graphically display this Hierarchal Structure on a Form and we could also keep its syntax as simple as possible. Give me a sample subset of the data with all Levels defined and I''ll post the code for you. Once you see it, I''m sure that you will be able to fill in the blanks.


展开 | 选择 | 换行 | 行号


这篇关于TreeView控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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