Click to See Complete Forum and Search --> : How to create MSDN TOC type of tree control/applet


February 21st, 2000, 10:45 PM
Hi,

I would like to know how I can create a tree control/applet, like the one on the MSDN site (TOC). In fact, I would like to populate this tree control dynamically by reading data from a backend database. Could you direct me to some resource/site where I could get more information on this ? Is the MSDN TOC applet available freely or in source code form ?

Thank you
Prashanth

Derek
February 22nd, 2000, 12:43 AM
Hi,
Try this out and let me now if it works, it worked for me.

Private Sub Form_Load

'Declare a variable of node type
Dim DNode as node

'Set the main Node and give it a name, i have called it Main, Prashanth will appear in the main page
Set Dnode = Treeview1.nodes.add(, , "Main","Prashanth")

'Add a child node to the Parent Node called Main, TOC will appear below Prashanth
' Main is the name of the parent, tvwchild is the relationship you want it to share with the parent, 'VisualBasic is any name you can give it and Toc is what you will see in your main Page
Set Dnode=treeview1.nodes.add("Main",tvwChild,"VisualBasic", "TOC")

End sub
Have fun,
Derek

Lothar Haensler
February 22nd, 2000, 01:14 AM
the easiest way to do that is to use the HTML workshop.
download it from the MS Site. it's free.
It does (almost) everything for you (i.e. build the tree, keep it in sync with the contents window...)
You can include the HTML Help Control OCX in your own app (or HTML page).

February 22nd, 2000, 02:30 AM
Hi,
thanks for the comments ! Let me put my question in a bit different way .. becuase it looks like .i was bit vague first time ;-)

I am developing a web application ... in my main web page I display a tree control UI which I would like, very much resemble the tree control on the MSDN site (Table of Content).

Further, the content of the tree would be very speficif to my apllication .. what i mean is, unlike the MSDN control, I wouldn't be displaying the table of content...but rather my apllication data (which has some in-built hierarchical relationship) .... and more importantly .. this data would be fetched in real time and the tree UI is populated...

Note : the MSDN control is a Java apllet .... is there a similar activex control available ...?

please let me know .. if i need to further clarify my question ...

thanx again
Prashanth

Lothar Haensler
February 22nd, 2000, 02:34 AM
>Note : the MSDN control is a Java apllet .... is there a similar activex control available ...?

the HTML Workshop comes with an ActiveX control as I said before: hhctrl.ocx

You can populate it any way you like.

On the other hand, there are JScript-only treeview "controls" available. We use [i]these[/b] instead of ActiveX controls or applets.

February 22nd, 2000, 02:38 AM
Hi,
thanks for the comments ! Let me put my question in a bit different way .. becuase it looks like .i was bit

vague first time ;-)

I am developing a web application ... in my main web page I display a tree control UI which I would like, very

much resemble the tree control on the MSDN site (Table of Content).

Further, the content of the tree would be very speficif to my apllication .. what i mean is, unlike the MSDN

control, I wouldn't be displaying the table of content...but rather my apllication data (which has some in-built

hierarchical relationship) .... and more importantly .. this data would be fetched in real time and the tree UI is

populated...

Note : the MSDN control is a Java apllet .... is there a similar activex control available ...?

please let me know .. if i need to further clarify my question ...

thanx again
Prashanth

February 22nd, 2000, 02:49 AM
WOW ! that was a quick response ;-) Thanks

Could you be more specific about the Java Script controls ....?

Also.. i have one fundamental question whne using the above mentioned activex control ... the database access would be carried out at the server end .. and the activeX UI control would be at the client end (web browser) .. how to communicate (transfer) the server fetched data to client so that it can populate the tree as and when necessary ... Note : MSDN control uses a kind of Just In Time Data technique .. fetches the subtree data only when requested ...

thanks
Prashanth

Lothar Haensler
February 22nd, 2000, 02:54 AM
>Could you be more specific about the Java Script controls ....?

I'll check with the collegue that found the thing on the web.

>how to communicate (transfer) the server fetched data to client so that it can populate the tree ...
AFAIK the HHctrl.ocx uses a file that contains the complete hierarchy including all the links.
You could create that file in your server-side app via the FileSystemObject (if you use ASP).
I don't know if there is any "fetch on demand" feature available that you could use to dynamically populate the tree.

Chris Eastwood
February 22nd, 2000, 02:55 AM
You can download an excellent freeware JavaScript 'folder control' from :

http://www.geocities.com/Paris/LeftBank/2178/

It allows you to customise just about every aspect of the tree (well, you do have the source-code!)


Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb

Chris Eastwood
February 22nd, 2000, 03:03 AM
Checkout the link I gave in the other part of this thread. It builds a JScript treeview control from an included file - this could be generated server side (in asp, php, cgi etc) - it's also browser independant.

Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb

Prashanth Patali
February 22nd, 2000, 04:57 AM
Hi,
Thanks a lot ... this should help me in doing further research into my desired tree UI...
Will post new messages if I have any further query ....
Prashanth

Prashanth Patali
February 22nd, 2000, 04:58 AM
Hi,
Thanks a lot ... this should help me in doing further research into my desired tree UI...
Will post new messages if I have any further query ....
Prashanth

Prashanth Patali
February 22nd, 2000, 07:08 AM
Hi,
Thanks a lot ... this should help me in doing further research into my desired tree UI...
Will post new messages if I have any further query ....
Prashanth