'useArrows:true'的意义是什么?

时间:2011-05-09 06:40:39

标签: extjs

Ext.onReady(function(){
    var tree = new Ext.tree.TreePanel({
        renderTo:'tree-div',
        title: 'My Task List',
        height: 300,
        width: 400,
        useArrows:true,
        autoScroll:true,
        animate:true,
        enableDD:true,
        containerScroll: true,
        rootVisible: false,
        frame: true,
        root: {
            nodeType: 'async'
        },

在上面的代码中,useArrows:true的意义是什么?它是用箭头显示树结构的属性(内置)吗?

1 个答案:

答案 0 :(得分:4)

据我所知,useArrows: true导致树使用 Vista样式的箭头而不是文件夹嵌套中的+/-符号和行进行渲染。

来自TreePanel.js

// private
onRender : function(ct, position){
    Ext.tree.TreePanel.superclass.onRender.call(this, ct, position);
    this.el.addClass('x-tree');
    this.innerCt = this.body.createChild({tag:'ul',
           cls:'x-tree-root-ct ' +
           (this.useArrows ? 'x-tree-arrows' : this.lines ? 'x-tree-lines' : 'x-tree-no-lines')});
},

来自ExtJS API

  

useArrows 布尔
  如果在树中使用Vista样式的箭头,则为true(默认为false)