1. #1
    Ext JS Premium Member
    Join Date
    Apr 2008
    Posts
    47
    Vote Rating
    0
    sarada is on a distinguished road

      0  

    Question Setting a custom icon for a tree node?

    Setting a custom icon for a tree node?


    Hi All,

    I am trying to set a custom icon to over the ExtJS provided background image for tree leaf node (in .x-tree-icon-leaf cls). I cannot override this cls as the icon is not static and it is different for each node.

    I tried to set 'icon' config option on NodeInterface with no success, still I get the image defined in .x-tree-icon-leaf cls.

    What would be a right place to update the icon?

    Thanks,
    Sarada

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,572
    Vote Rating
    308
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Usually you'd use iconCls but if the icons aren't known ahead of time then the icon config is the correct option. If you can't get it to work then please post a short example that demonstrates what it is you're doing so that we can try to help you. I assume you're using 4.0.7?

  3. #3
    Ext JS Premium Member
    Join Date
    Apr 2008
    Posts
    47
    Vote Rating
    0
    sarada is on a distinguished road

      0  

    Default


    In my case even on setting config option 'icon', I still see the icon defined in .x-tree-icon-leaf class. I am looking to find a way where I can select the node with .x-tree-icon-leaf cls and set my icon.

    I need DOM existing to do a select query and replace the icon.

    Any idea where can this be achieved?

    Yes, I am using ExtJS 4.0

  4. #4
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,572
    Vote Rating
    308
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Quote Originally Posted by sarada View Post
    In my case even on setting config option 'icon', I still see the icon defined in .x-tree-icon-leaf class. I am looking to find a way where I can select the node with .x-tree-icon-leaf cls and set my icon.

    I need DOM existing to do a select query and replace the icon.

    Any idea where can this be achieved?
    Setting the icon config is the correct way to do this. If you can't get that to work then post your code so that we can try to figure out why it isn't working. Hacking it to death with DOM manipulation should be a last resort.

    Quote Originally Posted by sarada View Post
    Yes, I am using ExtJS 4.0
    Not quite what I asked. I asked if you were using 4.0.7. Huge amounts of bugfixes went in between 4.0.0 and 4.0.7, it makes a big difference which version you're using if we're going to help you.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."