使用 + 使 YUI TreeView 仅展开/折叠/ - 图标
我遇到的问题是,当用户单击节点时展开/折叠节点的默认 YUI TreeView 行为妨碍了我正在实现的某些自定义 UI 功能。我已经能够通过订阅“clickEvent”并返回 false 在某种程度上减少这种情况;但是,在我编辑节点的标题(通过双击)后,问题仍然存在。该节点以默认方式突出显示和/或展开/折叠。我尝试了“focusChanged”和编辑事件的几种组合,但没有成功。
非常感谢!
肖恩
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能想使用用于实现 YAHOO.widget.Tasknode 的技巧。你只需监听树的 clickEvent ,然后让监听器返回 false ,就像这样
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
我对你最终想要实现的目标有点困惑,但我会开始阅读这里。
I am a bit confused by what you ultimately want to achieve but I would start reading here.