1. #1
    Sencha User BulletzBill's Avatar
    Join Date
    Mar 2010
    Location
    New York
    Posts
    138
    Vote Rating
    0
    BulletzBill is on a distinguished road

      0  

    Default TreePanel - Displaying a "leaf" node with a folder icon but no arrow/plus

    TreePanel - Displaying a "leaf" node with a folder icon but no arrow/plus


    Hi guys,

    I am trying to set up a TreePanel which every node should be a "folder" cls (it is for a mailbox listing) however only the nodes that actually are not leaves and have children should have the arrow/plus/minus collapse/expand button. My implementation of the tree panel is as follows (it is not fetching nodes asynchronously, they are all loaded when the tree is created):

    Code:
    var tree = new Ext.tree.TreePanel(
            {
                useArrows       : true,
                autoScroll      : false,
                animate         : true,
                enableDD        : false,
                containerScroll : true,
                border          : false,
                rootVisible     : false,
                loader          : new Tree.TreeLoader(),
                root            : new Tree.AsyncTreeNode(
                {
                    text     : 'Root',
                    id       : 0,
                    expanded : true,
                    children : [{id:'folder_id', text:'Folder', 'cls':'folder', 'expandable':false}, {...}]
                }) 
            });
    I thought that setting expandable to true for the nodes with no children would do the trick but it doesnt. And i can't use the "leaf" property set to false, because this changes the node icons, and i need them to be folder icons.

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    Try:
    Code:
    leaf:false,
    expanded:true,
    loaded:true

  3. #3
    Sencha User BulletzBill's Avatar
    Join Date
    Mar 2010
    Location
    New York
    Posts
    138
    Vote Rating
    0
    BulletzBill is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    Try:
    Code:
    leaf:false,
    expanded:true,
    loaded:true
    Unfortunately that didn't work, the nodes with no children were displayed using the leaf node icon instead of a folder. I did manage to implement a workaround though, for all the leaf nodes I just manually set the "icon" property to the closed folder icon.

Similar Threads

  1. How to hide the folder icon in non-leaf nodes in a TreePanel
    By rvillane in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 3 Oct 2008, 9:43 AM
  2. Change non-leaf node icon in TreePanel
    By jorseijo in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 18 Apr 2008, 6:59 AM
  3. "x-form-invalid-icon" Not displaying
    By Ashiro in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 30 Oct 2007, 1:35 AM

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar