PDA

View Full Version : Inner panel is not correctly positioned after setting padding to parent panel



andrej_marincic
11 May 2010, 5:38 AM
Hello,
i have small problem.
I have panel nested inside other panel.
When i programatically change padding of outer panel with call "panel.body.applyStyles("padding-top: 3px")",
inner pannel is not resized to new - smaller height, even if I call panel.doLayout().

But if i then manually resize browser window, than inner pannel is resized correctly to new height - with style padding-top: 3px

Any ideas anybody? :-?

Andrej

aconran
11 May 2010, 8:21 AM
This is caused by the fact that you are changing dimensions of components that have been laid out.

Use the padding configuration or the bodyStyle configuration to configure the Panel to have Ext automatically handle this for you.