On lunch, my application is loading a data store and is creating some Ext.panel.Panel inside an accordion layout based on the number of items in the data store.

Is there a way to auto adjust the height of the accordion Panel ? The height should be determined by the number of Panel inside the accordion Panel.

有帮助吗?

解决方案

I did it by setting the height manually.

I estimated that each accordion item is 37 pixel. And I am adding 100 to leave space for the text inside the accordion items.

myPanel.setHeight(records.length*37+100);

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top