Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sort in Treeview
Message
From
11/06/2002 03:10:48
 
 
To
10/06/2002 22:07:04
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00666763
Message ID:
00666821
Views:
13
You have two Sorted properties:

1. Sorted property of Node object sorts only its childrens:

ThisForm.TreeView1.Object.Nodes.Add(, , "Parent", "Parent")
ThisForm.TreeView1.Object.Nodes.Add("Parent", 4, "SecondChild", "SecondChild")
ThisForm.TreeView1.Object.Nodes.Add("Parent", 4, "FirstChild", "FirstChild")
ThisForm.TreeView1.Object.Nodes("Parent").Sorted = .T.

If you add new children to "Parent" after setting Sorted to .T., new children will NOT be sorted automatically; you must again set Sorted property to .T.
If you want to sort also childrens of other node, you must use Sorted property of both parent nodes.

2. Sorted property of TreeView control sorts root level nodes:
ThisForm.TreeView1.Object.Nodes.Add(, , "ThirdNode", "ThirdNode")
ThisForm.TreeView1.Object.Nodes.Add(, , "SecondNode", "SecondNode")
ThisForm.TreeView1.Object.Nodes.Add(, , "FirstNode", "FirstNode")
ThisForm.TreeView1.Object.Sorted = .T.

Plamen Ivanov
MCSD .NET Early Achiever and MCAD .NET Charter Member (VB .NET/SQL Server 2000)
MCSD (VB 6.0/SQL Server 2000)

VB (.NET) - what other language do you need in the whole Universe?...

Previous
Reply
Map
View

Click here to load this message in the networking platform