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