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.
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?
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.
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.
Originally Posted by sarada
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.