I got it list :)<br><br>setIconCls was added to ExtJs ver 3.3, I was using 3.2.1<br><br><a href="http://www.sencha.com/forum/showthread.php?106686-change-properties-for-node-object&highlight=setIconCls">http://www.sencha.com/forum/showthread.php?106686-change-properties-for-node-object&highlight=setIconCls</a><br>
<br>cheers,<br><br>elshae<br><br><div class="gmail_quote">On Fri, Nov 12, 2010 at 11:58 AM, IT Intern <span dir="ltr"><<a href="mailto:itintern12@gmail.com">itintern12@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello GeoExt List,<br><br>I have a tree panel with some nodes/containers etc. I want to be able to use setIconCls to change their iconCls <i><b>after</b></i> the tree has been created. Unfortunately when I try to use this method I get an error in firebug tell me that setIconCls is not a function...what am I doing wrong here?<br>
<br>layerRoot = new Ext.tree.TreeNode({<br> text: "All Layers",<br> expanded: true<br> });<br><br>tibetContainer = new Ext.tree.TreeNode({<br> text: "Tibetan Labels",<br>
expanded: true,<br> id: 'tibet'<br> });<br><br>var layerTree = new Ext.tree.TreePanel({<br> overflow: 'visible', // For the Combo popup<br> region: "west",<br>
title: "Map Layers", <br> root: layerRoot,<br> loader: new Ext.tree.TreeLoader({applyLoader: false}),<br> enableDD: true,<br> collapsible: true,<br>
width: 300,<br> autoScroll: true,<br> expanded: false<br> });<br><br>layerRoot.getOwnerTree().getNodeById(tibetContainer.id).setIconCls('myClass'); //fails<br>
<br>Thanks for your time,<br><br>elshae<br><br><br>
</blockquote></div><br>