PDA

View Full Version : tools config attribute on Panel



robertoroberto
25 Jul 2009, 6:24 AM
Hi
I try to use the tools config attribute on a Panel but they are not displayed.

why? any idea?
I'm sure I forgot something

thanks



...
new Ext.form.FormPanel({
renderTo: document.body,
collapsible : true,
items: vItems,
tools :[ {
id:'maximize',
qtip: 'maximize',
hidden: false,
handler: function(event, aToolEl, aPanel)
{
aPanel.setWidth('100%');
aPanel.tools.restore.hidden = false;
aToolEl.hidden = true;
}
},
{
id:'restore',
qtip: 'restore',
hidden: true,
handler: function(event, aToolEl, aPanel)
{
aPanel.setWidth('75%');
aPanel.tools.restore.maximize = false;
aToolEl.hidden = true;
}
}
]
});
...

Animal
25 Jul 2009, 7:56 AM
It needs



header: true,


And I think that's a bug. If there are tools, the renderer should create the header Element.

robertoroberto
25 Jul 2009, 8:02 AM
TY Animal

I think it also.
Another workaround that I found is also to add a title to the panel: this force to create a header and so it is working.

Can you move it under "bugs"? or I need to open another post ?
thanks

robertoroberto
25 Jul 2009, 8:07 AM
There is another bug related to this.
If you have in a border layout and 2 panels (west and center or center or east) and each panel is collapsible.. but header : true or title are missing..., collapse button in header are missing too (because all the header is missing)

Animal
25 Jul 2009, 8:22 AM
Yes, I have reported this: http://extjs.com/forum/showthread.php?p=363817