PDA

View Full Version : Collapsed panel - Disabling the expansion button



awhiteho
6 Feb 2013, 5:03 AM
Hi,

I've got an app where the western region of the viewport contains search criteria. This search criteria is only utilized on certain tabs of the application.

For the tabs where it's not used I have the panel collapsed but the expansion button if clicked will show the panel.

Is there a way to disable the expansion button? I've tried disabling the panel but that will gray out the panel but it can still be displayed using the expansion button.

Thanks,

Art Whitehouse

winkelmann
6 Feb 2013, 5:12 AM
You can get to the tools in a pane or window using


myPanel.getHeader().getTools()


The code above gives you an array of all tools currently on your panel or window.
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.panel.Header-method-getTools (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.panel.Header-method-getTools)

If you only ever have a single tool button on your window you can disable it like this:


myPanel.getHeader().getTools()[0].setDisabled(true)


Hope this helps :-)

AssetWorks
6 Feb 2013, 6:31 AM
try the 'hideCollapseTool: true' config on those pages that you dont need it