[Users] setIconCls Error, is Not a Function

IT Intern itintern12 at gmail.com
Fri Nov 12 22:22:47 CET 2010


I got it list :)

setIconCls was added to ExtJs ver 3.3, I was using 3.2.1

http://www.sencha.com/forum/showthread.php?106686-change-properties-for-node-object&highlight=setIconCls

cheers,

elshae

On Fri, Nov 12, 2010 at 11:58 AM, IT Intern <itintern12 at gmail.com> wrote:

> Hello GeoExt List,
>
> I have a tree panel with some nodes/containers etc.  I want to be able to
> use setIconCls to change their iconCls *after* 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?
>
> layerRoot = new Ext.tree.TreeNode({
>                 text: "All Layers",
>                 expanded: true
>             });
>
> tibetContainer = new Ext.tree.TreeNode({
>                 text: "Tibetan Labels",
>                 expanded: true,
>                 id: 'tibet'
>             });
>
> var layerTree = new Ext.tree.TreePanel({
>                 overflow: 'visible',     // For the Combo popup
>                 region: "west",
>                 title: "Map Layers",
>                 root: layerRoot,
>                 loader: new Ext.tree.TreeLoader({applyLoader: false}),
>                 enableDD: true,
>                 collapsible: true,
>                 width: 300,
>                 autoScroll: true,
>                 expanded: false
>             });
>
> layerRoot.getOwnerTree().getNodeById(tibetContainer.id).setIconCls('myClass');
> //fails
>
> Thanks for your time,
>
> elshae
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20101112/e35963ef/attachment.htm 


More information about the Users mailing list