cakephp工作笔记22 - extjs拖放篇

本文介绍了如何在ExtJS中使用TreeNodeUI类来自定义树节点的用户界面表现形式。TreeNodeUI是ExtTreeNodes的默认UI实现,允许开发者通过继承此类来定制节点外观。文中提供了获取节点元素的具体方法。
一、[url]http://www.walterzorn.com/dragdrop/dragdrop_e.htm[/url]

二、树节点对象 Ext.tree.TreeNode如果需要获取节点对象的element元素,则必须用getUI()方法返回TreeNodeUI对象,这个类的定义是This class provides the default UI implementation for Ext TreeNodes. The TreeNode UI implementation is separate from the tree implementation, and allows customizing of the appearance of tree nodes.If you are customizing the Tree's user interface, you may need to extend this class, but you should never need to instantiate this class.This class provides access to the user interface components of an Ext TreeNode, through Ext.tree.TreeNode.getUI。
这段话是说这个类是专门为Treenode的UI接口的实现对象,可以自定义节点的表现形式,如果想自定义节点,你可能需要派生这个类,但你不是一定需要实现这个类,
所以在节点内部是这样用的El的 new Ext.dd.DragSource(this.getUI().getEl(),{group:"dd"});//指定拖放的接受对象
而在节点外部则是
library.getNodeById("node4").ui.getEl().firstChild.id;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值