On Sun, 27 Feb 2005 21:35:25 +0200, John Winterbottom wrote
(in message <38*************@individual.net>):
If you can live with it's limitations you can fake a treeview using a
regular list box, a union query and a little code. Screen shot here:
http://www.assaynet.com/downloads/access/treeview.jpg
I'm a bit late on this topic (didn't read cdma the last 2 months)
but I recently wrote an (ugly) prototype of something similar.
If someone's interested:
<http://homepage.mac.com/micih>
(db15.zip, an Acc97 database).
I did no deep tests because I had other things to work on lately.
Of course this is not ready for prime time, just a "study" what
could be possible with a ListControl as a fake TreeView.
I will probably post a better documented/more bug free version some
time...
The basic concept is a very ugly implementation of some kind of
"materialized path" for the outline structure.
Most of the code for moving nodes around is inside a class module.
(triggered by the buttons on the sample form.)
You can set the number of alowed outline levels and the max. number
of entries per level (the demo uses 4 levels and a maximum of 99
entries per level). The Key-Field (string) must be adjusted if
you want to change this.
(For 4/2 the key length is 8, i.e entry 1.2 is 01020000).
The whole code is probably too slow for very big outlines...
The outline/tree-structure is kept in a separate table.
It's possible to use the whole parent Outliner-Table (see
example form) or only a restricted set: This was implemented
because the original motivation for the whole thing was
a database for meetings.
Meetings<--1toMany-->Topics<--1to1-->OutliningStructure
It is possible then to work only with topics of specicif meetings
by setting the appropriate restrict Parameter (see Class_Init).
And there is also code to get the path to a specific entry with
a delimiter like "->" (i.e. Computers->Portables->IBM->Thinkpads).
Mike