views:

398

answers:

2

Hello,

The problem I am having is that the default YUI TreeView behavior of expanding/collapsing nodes when a user clicks on them is getting in the way of some custom UI functionality I am implementing. I have been able to reduce this to some degree by subscribing to the "clickEvent" and returning false; however the problem still presents itself after I edit the title of a node (by double-clicking). The node is highlighted and/or expanded/collapsed in the default fashion. I've tried a few combinations of "focusChanged" and editing events without success.

Thank you very much!

Sean

A: 

I am a bit confused by what you ultimately want to achieve but I would start reading here.

Julien Chastang
+1  A: 

You may want to use the trick used to implement the YAHOO.widget.Tasknode. You just listen to the clickEvent of the tree, and make the listener return false, something like this

//...
this.treeView.subscribe("clickEvent", this.tree_onClickEvent, this, true);
//...
tree_onClickEvent: function(p_oEvent, p_args)
{
   return false;

},
//...
Nassif Bourguig