| Page 1 of 1 | [ 6 posts ] |
|
I have some sample code here: http://work.dropdead.org/filebrowser/
when you highlight a node then mouseover the span that says "Mouseover for Node" it always returns null instead of a reference to the node, what am I doing wrong? Should i be doing something completely different to get the selected/highlighted node? I'm setting singleNodeHighlight to true as per api reference: getHighlightedNode YAHOO.widget.Node getHighlightedNode ( ) When in singleNodeHighlight it returns the node highlighted or null if none. Returns null if singleNodeHighlight is false. Returns: YAHOO.widget.Node a node reference or null |
|
You are not highlighting the nodes. You have to use onEventToggleHighlight:
http://developer.yahoo.com/yui/docs/YAH ... eHighlight You must tell TreeView which event you mean to associate with highlighting. |
|
thank you for your answer I've made some headway!
ok now this is weird maybe, but now when I "highlight" with a single click it doesn't visually highlight the node anymore but if you do the mouseover it returns an object reference so it's working now ... except without the visuals, I tried adding tree.setNodesProperty('enableHighlight', true); but it didn't help, what else am I missing? |
|
You are missing the className that says how you want your highlighting displayed. Highlighting simply adds a className to signal the state of the node. To make that state visible, you have to enclose the whole tree, that is, the div that will contain the tree, and give it any of the two classnames corresponding to the two styles provided. You can use none of them and simply do your own styling. Highlighting in treeview does not force any visual style. Check the examples to see which style suites you the best and if none does, do your own.
|
|
ok got it now, thank you.
I'm sure I'll have more treeview questions when I get to dynamic display. |
|
If you read the documentation and check the examples, I think you shouldn't have any more questions. All that I've replied here was in the examples.
|
| Page 1 of 1 | [ 6 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group