PDA

View Full Version : customizing a treepanel component



soung
28 Jun 2011, 9:12 PM
how to customize a treepanel?
I want to give a treepanel aspect that I want. but I do not know how.
could you tell me a way to start

skirtle
30 Jun 2011, 8:54 AM
What do you mean by 'aspect'? Do you mean styling? If so then you should start by investigating the various config options that have 'cls' in their names, most notably cls and iconCls. Whether you do the styling at the treepanel or treenode level depends on how much flexibility you need. From there it's just a case of specifying suitable CSS rules... I suggest using a tool like Firebug to inspect the DOM elements to figure out exactly what rules are required to give you the appearance you want.

soung
4 Jul 2011, 2:42 PM
hi,
thank you for your answer.
i want to do something like:


prevent a treenode to be collapsible(i want to see always all items of the treenode)
add a item to a treenode programmatically

thanks

skirtle
4 Jul 2011, 2:53 PM
prevent a treenode to be collapsible(i want to see always all items of the treenode)

http://www.sencha.com/forum/showthread.php?136633


add a item to a treenode programmatically

See appendChild():

http://dev.sencha.com/deploy/ext-3.4.0/docs/?class=Ext.tree.TreeNode