开发者

what is the significance of 'useArrows:true'?

开发者 https://www.devze.com 2023-03-04 01:46 出处:网络
Ext.onReady(function(){ var tree = new Ext.tree.TreePanel({ renderTo:\'tree-div\', title: \'My Task List\',
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,
        fr开发者_如何学编程ame: true,
        root: {
            nodeType: 'async'
        },

In the above code,what is the significance of useArrows:true? Is it the property(builtin) to display the tree structure with arrows?


As far as I can see the useArrows: true causes the tree to be rendered using Vista-style arrows instead of +/- signs and lines in the folder nesting.

From 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')});
},

From the ExtJS API:

useArrows : Boolean
true to use Vista-style arrows in the tree (defaults to false)

0

精彩评论

暂无评论...
验证码 换一张
取 消