http://www.vbaccelerator.com/home/VB...ol/article.asp
or
http://tinyurl.com/p5jrv
I've just tested it and it works fine in Access.
It has a Movenode method which alows you to (strangely enough) move nodes
around.
This is the first time I've tried it so the codes probably a bit rough but
the following:-
Private Sub Command1_Click()
Dim tvw As vbalTreeView
Dim nodTop As cTreeViewNode
Dim nodSub As cTreeViewNode
Dim nodSubSub As cTreeViewNode
Dim children As cTreeViewNodes
Dim subChildren As cTreeViewNodes
Set tvw = Me.vbalTreeView0.Object
Set nodTop = tvw.Nodes.Add(, etvwFirst, "xxx")
nodTop.Text = "1111"
Set children = nodTop.children
Set nodSub = children.Add(, etvwChild, "yyyy")
nodSub.Text = "2222"
Set subChildren = nodSub.children
Set nodSubSub = subChildren.Add(, etvwChild, "zzzz")
nodSubSub.Text = "3333"
End Sub
Added three nodes in the following configuration
1111
|____ 2222
|____ 3333
Then the following code
Private Sub Command2_Click()
Dim tvw As vbalTreeView
Dim nodTop As cTreeViewNode
Dim nodSub As cTreeViewNode
Dim nodSubSub As cTreeViewNode
Dim children As cTreeViewNodes
Dim subChildren As cTreeViewNodes
Set tvw = Me.vbalTreeView0.Object
Set nodTop = tvw.Nodes("xxx")
Set children = nodTop.children
Set nodSub = children.Item("yyyy")
Set subChildren = nodSub.children
Set nodSubSub = subChildren.Item("zzzz")
Call nodSubSub.MoveNode(nodTop, etvwChild)
End Sub
Moved node 3333 to the folowing configuration
1111
|____ 2222
|____ 3333
--
Terry Kreft
"(PeteCresswell)" <x@y.Invalidwrote in message
news:oc********************************@4ax.com...
Are there TreeViews that can be sorted on-the-fly? i.e. that can be
sorted
without reloading them?
--
PeteCresswell