Programmatically Select TreeNode

Hi,

I think this is simple question but I've been stuck on it for some time now. I have a treepanel and would like to be able to have a default selection. I first thought the selectPath method would be what I want, and that seems to work, but doesn't give any visual indication that a node is selected (highlighted). In the forums I have come accross references to node.ui.highlight() but that gives me 'Ext.fly(...) is null or not an object'.

What I would like to see is my treepanel with a node selected just as if the user just clicked on it.

Any help would be much appreciated.
Kevin

Ext Team: I am still very new to Ext but have been quite impressed, keep up the good work.

How witty...after a day of searching I figured I'd risk a question.
At any rate thanks for the link it got me going in the right direction.

For anyone else that reads this, function.defer() was what I needed.

Something I am still curious about, however, is why I needed to defer the call to TreePanel.selectPath(). I am calling it in the TreePanel's render event after building the tree, why does it need a pause? Is there another event I should be using so that I don't have to defer...maybe the window's render event (the tree is in a window)?

Yes I'd like to know the same thing - we shouldn't have to use defer. I note that TreeNode has no "render" event we can monitor. Is there any other way we can automatically select a treenode upon the tree panel rendering?