PDA

View Full Version : TreePanel Expand/Collapse



nak1
6 May 2010, 6:53 AM
Guys,

Is there a way to hide an expand/collapse +/- button on the TreePanel?

Animal
6 May 2010, 9:39 AM
It's a Panel tool

nak1
6 May 2010, 11:23 AM
I looked into that, however, nothing appears to be loaded in the TreePanel's tool object, it's empty. I was able to effectively do the same thing by altering the style classes that render the +/-, but this will alter all the TreePanels I render to this page, which I was hoping to avoid.


.x-tree-no-lines, .x-tree-elbow-end-minus {
background-image: url("images/transparency.gif") !important;
}

.x-tree-elbow-line, .x-tree-elbow, .x-tree-elbow-end, .x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus {
width:0px;
}

What specifically were you doing to the tools object to remove the + and - tools?

Animal
6 May 2010, 2:16 PM
http://www.extjs.com/deploy/dev/docs/?class=Ext.Panel&member=tools

nak1
6 May 2010, 2:38 PM
Man, no dice. I tried the following in my TreePanel definition:



tools:[{
id:'minus',
hidden:true
},{
id:'plus',
hidden:true
}],


But the +/- collapse and expand icons still appear next to each branch in the tree.