PDA

View Full Version : different TreePanel alternatively in the same place



gabrialice
8 Nov 2012, 2:04 AM
Hi everybody!
I'm building a desktop application using EXTJs 3.4. I have a window with border layout which is splitted into two sections: at the left there is a TreePanel, at the right a TabPanel. In the left side I need to visualize two different TreePanel objects (containing different elements) depending on different situations. I have put both tree panel as items in desktop window:

winModul0=desktop.createWindow({
id:id,iconCls:appIco,title:'MAIN App',width:800,height:566,
shim:false,animCollapse:false,layout:'border',
constrainHeader:true,defaults:{split:true,border:true},
items:[trElems,trSearchRes,tpElems]})

where trElems and trSearchRes are the two TreePanels that I want to visualize alternatively.
Then I put SetVisible(true) or SetVisible(false) of the the trees dipending on the situation but it's not working because noone of the two trees is visualized.
How can I do this otherwise?

tvanzoelen
8 Nov 2012, 4:17 AM
This is the ExtJs 4 forum, you should post this in the ExtJs 3 forum. But you could try to play with the hideMode property and set an other mode.

And just start with the situation where the two trees are visible. Then you know they are properly rendered.