1. #1
    Ext User
    Join Date
    May 2008
    Posts
    18
    Vote Rating
    0
    npintos is on a distinguished road

      0  

    Default Custom Tree icons Rendering only after expanding nodes

    Custom Tree icons Rendering only after expanding nodes


    Hi!

    I seem to be missing some basic concepts from tree rendering, because i'm trying to do the most basic thing, and it's not working.

    I have a tree with async nodes. When i expand a node, i want it's children to show a custom icon.

    [CODE]var arbolDatos = new Ext.tree.TreePanel({
    //useArrows:true,
    autoScroll:true,
    animate:true,
    containerScroll: true,
    preloadChildren: false,
    loader: treeLoader,
    border:false,
    iconCls: 'my-icon',
    bodyBorder: false,
    root: {
    nodeType: 'async',
    text: 'Campa

  2. #2
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,337
    Vote Rating
    75
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    just out of curiosity, why are you looking to change the iconCls after the load? Why not just set it when the node is created?

  3. #3
    Ext User
    Join Date
    May 2008
    Posts
    18
    Vote Rating
    0
    npintos is on a distinguished road

      0  

    Default


    because i don't know how to do that! the nodes are created automatically by (i guess) the treeloader. As i said, i tried to apply the behaviour i want in the treeloader 'load' event, with no effect.

    How would you do it?

  4. #4
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,337
    Vote Rating
    75
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    there are a few approaches:

    the best one is the server side setting the iconCls.

    another way is setting up a handler for the append event for each branch node, which (i think) fires after the children have been rendered.

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