Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sparse Populated TreeView and Record Movement
Message
 
À
06/03/2002 10:03:44
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00628841
Message ID:
00629375
Vues:
16
Thanks Cetin

Now one more query. Generally the populating happens to 2 levels, Root, Child of Root. Now what if the navigated to record is say 5 levels deep?

>I think I got you wrong. Assuming you have a schema to create a unique key per record navigated and you know its parent key :
>
>
*Method adding the node if not there
>lcKeyNew = 'SomeNewKey'
>lcKeyParent = 'ParentKey'
>lcText = 'NodeText'
>if type('TV.Nodes(lcKey)')#'O' && Doesn't exist
>   if empty(lcParentKey) && Is a root node
>       TV.Nodes.Add(,0,lcNewKey,lcText)
>   else
>       TV.Nodes.Add(lcParentKey,4,lcNewKey,lcText)
>   endif
>endif
>TV.Selecteditem = TV.Nodes(lcNewKey)
>TV.Nodes(lcNewKey).Expanded = .t.
>TV.Nodes(lcNewKey).Ensurevisible
>
Cetin
>
>
>>Hi Cetin
>>
>>Thanks for your response but sorry I cannot really understand what will happen and EnsureVisible I am totally at lost.
>>
>>I have functions like BuildTree and SynchronizeTreeView etc. How will the three lines do the pouplating of my treeview. I have borrowed a lot of codes from 2 different places to get this one working for me using CodeBook.
>>
>>>>On a form I have a TreeView and navigationable TextBoxes. I have sparse populated the TreeView as the no. of node can go high, now if I use the TreeView for navigation then alls well.
>>>>
>>>>If I navigate using the toolbar for the form, though the TV will highlight the right records if populated (by user interaction) but for the none populated nodes the TV is confused.
>>>>
>>>>Any logic to make a sparse TV to populate on record movement rather than clicking on the pluses and minuses
>>>>
>>>>Thanks in advance
>>>
>>>TV.Selecteditem = TV.Nodes(NodeKey)
>>>TV.Nodes(NodeKey).Expanded = .t.
>>>TV.Nodes(NodeKey).Ensurevisible
>>>
>>>Cetin
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform