想实现树的节点第一个节点选中.
在treePanel.load的时候加了事件..
tree.no('load',function(node){
   node.firstChile.select();
});
这样的不管用.

解决方案 »

  1.   

    tree.no('load',function(node){
      node.firstChile.select();
    });
    tree.no-->on
      

  2.   


       load:function(node){
    node.firstChild.select();
            alert(node.firstChild.isSelected());//true
       }

      

  3.   

    if your tree is a checkedtree ,you can add checked attribute...
    just like http://extjs.org.cn/node/223
      

  4.   

    我有一点没说清楚..
     没有用到checkbox.
    只是一个普通的树.
       树单击节点.节点背景不是会变成蓝色的吗.
     我就想树一加载第一个节点背景就是蓝色的样子..
      

  5.   


    前面这句node.firstChild.select();你没看见?
      

  6.   

    执行完这句话
    node.firstChild.select();
    alert();不会执行了..
    这是为什么?
      

  7.   

    nodes[i].getUI().toggleCheck(true); //设置UI状态为选中状态
    nodes[i].attributes.checked=true; //设置节点属性为选中状态nodes[i]为树节点
      

  8.   

    楼主不知道你的问题解决没有,我现在用的EXT.NET的Treepanel也想实现你所说的效果,不能到能否提供帮助谢谢。。
      

  9.   

    你测试过你的那个node是第一个节点吗?你的那个node有值吗?