Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting TreeView Control
Message
 
To
All
General information
Forum:
Visual Basic
Category:
ActiveX controls
Title:
Sorting TreeView Control
Miscellaneous
Thread ID:
00643917
Message ID:
00643917
Views:
35
The TreeView control that comes with VB 6 has a 'Sorted' boolean property that sorts the nodes in the control. However, it seems that if you fill a TreeView with a parent (root) node that has children, the sorted property no longer functions. Does anyone know if this is by design, or if there is a work-around?

For example:

Dim oNode As Node
Set oNode = TreeView1.Nodes.Add(,,"root","root")
Set oNode = TreeView1.Nodes.Add("root",tvwChild,,"b")
Set oNode = TreeView1.Nodes.Add("root",tvwChild,,"a")
TreeView1.Sorted = True

This code should fill the TreeView as follows:
--------------
root
.
...a
.
...b
--------------
however... it does not work.
Todd Tebay - MCSE, MCP+I
Next
Reply
Map
View

Click here to load this message in the networking platform