Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Treeview Problem
Message
From
02/04/2003 08:54:28
 
 
To
01/04/2003 21:49:53
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00772794
Message ID:
00772913
Views:
10
Hi Andy,

Don't know anything about the Treeview in Megafox but I assume you want the new node to slot in in alpahbetical order. I think you can do this in code using something like (pseudo code):
oTestNode = NewNode.Parent.Child
DO WHILE oTestNode.Text < NewNode.Text .AND. !ISNULL(oTestNode.FirstSibling)
  oTestNode = oTestNode.FirstSibling
ENDDO
NewNode.FirstSibling = oTestNode.FirstSibling
oTestNode.FirstSibling = NewNode
This presupposes that you've already added the node. It might be simpler to identify the slot *before* adding the node otherwise you'll need to add code to the above to exclude the new node itself from the loop.

HTH,
Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform