Ken,
There is no direct way that I know of. Here are two suggestions:
1. If you are working directly with the control by clicking on it or something, you might be able to get a reference to it using _Screen.ActiveForm.ActiveControl.
2. When you add the Node in the first place, add the name of the Treeview control at that time (you should have an object reference to Treeview.Nodes in order to add it). You could store the name in the Tag property of the Node and use Eval() to get a reference to it later.
HTH.
>that gets you to the top node (node.root is quicker) but NOT to the treeview object itself
>
>>If I remmeber correctly, you can use the node.parent and recursively move up the tree to the root object.
>>
>>
>>
>>
>>>>can you give more information on what you are trying to do? some code??
>>>>
>>>>>>>Hi,
>>>>>>>
>>>>>>>How can I get a ref to the treeview object from a node object ref? 'Parent' only returns the parent node.
>>>>>>>
>>>>>>>TIA,
>>>>>>
>>>>>>
>>>>>>If you need the key of a node it is node.key. Any node can be ref by the unique key. An example of the treeview is on my web site as well as a programmers help file that will have tons of code examples in it..
>>>>>>
>>>>>>
http://www.semo.net/suburb/thornton/visual.html>>>>>
>>>>>John, thanks for replying, but perhaps you shoud re-read my question. I don't need keys, indexes, or other node references - I need the ref to the
TREEVIEW OBJECT from a node object reference.
>>>>>
>>>>>Thanks,
>>>
>>>OK - suppose you have a method that receives a node object as a parameter. The node can be from one of several treeviews on your form. Now - you need to do something to the treeview object itself (expand it's width as a silly example) in your method. So my Method Is:
>>>lparameters toNode
>>>toTreeView = MagicGetTreeObjectFromNodeFunction(toNode)
>>>to.Treeview.width = toTreeview.width + 100
>>>
>>>Hope this explains it,
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao