Treeview control

  • Thread starter Thread starter Dale Fye
  • Start date Start date
D

Dale Fye

Hi!

I'm working with a heirarchical data set and would like to
display it in a tree view. I've figured out how to
populate it, and that is working great.

The problem is that I cannot figure out how to respond to
any events (I can't even find a good list of the events)
to determine which items in the view are checked or which
is the currently selected item. I've been all over google
and some of the newsgroups but cannot find much other than
to use a 3rd party replacement, which is not an option.

I am using V6 of the control, if that makes a difference.

Appreciate any and all responses.
 
The treeview's NodeClick eventhandler is fired when a node
is clicked on and this handler's parameter is the Node
object that has been clicked.

Hope This Helps
Gerald Stanley MCSD
 
I've had this problem in the past. Do you know where one
could find documentation on the treeview control, and
while we're at it the listview control. I don't
understand why MS includes it without documentation.
 
From a post by Cheryl Fisher:
------------------
The best detail/explanation for TreeView use that I have found is in
http://msdn.microsoft.com where you can search on Tree View Control (with
space between "tree" and "view"). Below is a link to an MSDN article on how
to bind data to a Tree View control

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/htm
l/vbconscenarioviewingbibliomdbdatabaseastree.asp

If the above link wraps (which it will), here is an alternate link:
http://tinyurl.com/32ym2

And, here is another one which includes a sample download:
http://www.pointltd.com/Downloads/Details.asp?dlID=36


hth,
--

Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX
------------------------------

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 
ListView:
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/cmctl198/html/vbobjListView.asp

TreeView:

http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/cmctl198/html/vbobjTreeView.asp


Anyway, the best thing to do is in the VBE editor, on the
top combo box on the left, select the name of your
control. Now, on the right, it will have all the
available events.

Also, to get intellisense working right, use:

Dim t As MSComctlLib.TreeView
Set t = Me.TreeViewControl.Object


Let me know if you need any help, as I'm currently knee
deep in a project hinged around treeviews and listviews.
You can reach me at my (e-mail address removed)

My isp is Earthlink



Chris Nebinger
 
Chris,

Thanks for the links and advice about intellisense. I
finally figured out the bit about the editor events. The
properties dialog only showed about 4 events for the
control, but the combo must have had 12 or more.
 
Back
Top