>>
>>
>> Lparameters tnIndex
>> Local lnIndex
>> With this.OleTreeView
>> .Nodes(tnIndex).Expanded = .t.
>> If .Nodes(tnIndex).Children > 0
>> lnIndex = .Nodes(tnIndex).Child.Index
>> .ExpandAll(lnIndex)
>> Do while lnIndex # .Nodes(tnIndex).Child.LastSibling.Index
>> lnIndex = .Nodes(lnIndex).Next.Index
>> .ExpandAll(lnIndex)
>> Enddo
>> Endif
>>Endwith
>>
Cetin
>
>Ok I made the expandall a custom method and I am calling it as follows from my expand.click button:
>
>
>With thisform
> .expandall(.OleTreeView.SelectedItem.Index)
>Endwith
>
>
>However I am still getting an error
OLE Error Code 0x8002006: Unknown Name
when I get to my .expandall method on the line that says:
>
>
.ExpandAll(lnIndex)
>
>Is this because of the recursive 128 max you was talking about. If I had 4 nodes and I select node 3 then expand, I still get the error and that is only 1 node of expansion.
>
>node1===>node2===>node3====>node4
>
>Anyway, thank you for your help, your techniques are exceptional.
>Nick Patel
No Nick,
This time it's me did coding error :) I simply failed I made it 'with this.OleTreeView' and OleTreeview doesn't have ExpandAll method (when subclassed and made that a method of tv it was right :)
Prefix .ExpandAll calls with this (this.ExpandAll(..))
Cetin