PDA

View Full Version : How can I change a panel collapsibility programatically



Keith Chadwick
1 Dec 2009, 2:06 PM
I have a basic panel which depending on the circumstances can be collapsed by the user or not. The panel is always present but depending on the page/data that is being requested I need to 'hide' the minimize/maximize icon on the right hand side of the panel header.

I have searched for a way to do this programatically through existing panel methods but there appears to be none. Am I left with doing some css class insertions via the components methods or is there an easier way?

Thanks in Advance
Keith

Animal
1 Dec 2009, 2:08 PM
Hide the collapse tool so they can't click it.

Keith Chadwick
1 Dec 2009, 2:15 PM
Hide the collapse tool so they can't click it.

Thats is what I expected. Was just wondering if there was a way to do it with an already present method within the panel component.

Thanks for the confirmation.

Animal
1 Dec 2009, 11:30 PM
well, if this is a basic collapsible Panel the code is only



myPanel.tools.collapse.hide();


And if it is in a border layout, then the code is



myPanel.tools.toggle.hide();


So no need for a library method.

Keith Chadwick
2 Dec 2009, 5:34 AM
Thanks Animal I did not look into the details of that collection in the config of the panel.

Cheers
Keith