PDA

View Full Version : Auto Height and auto width of ext panel not working



sachin sachdeva
13 Dec 2010, 6:02 AM
hello sir as gven below in my code i want that my ext panel strech across the screen regadless the pixel in that.plz let me know where i am mistaken...
metaDataPanel = new Ext.Panel({
// collapsible : true,
id : 'metaDataPanel',
title : 'Advanced Search',
monitorResize : true,
layout : 'fit',
autoScroll : true,
items : [{
autoHeight : true,

autoScroll : true,
html : '<iframe scrolling="no" style="width:100%;height:650px;overflow:hidden;" name="asssetSearchFrame" frameborder = "0" src="search.jsp?"></iframe>'

}]

in search.js i have




var search = new Ext.FormPanel({
standardSubmit : true,
labelWidth : .01,
// url : 'searchResults.jsp',
frame : true,
bodyStyle : 'padding:5px 5px 5px 5px',
// defaultType : 'textfield',
monitorValid : true,
bodyStyle : 'height:485px;',
autoWidth : true,
buttonAlign : 'left',
autoScroll : true,

defaults : {
width : 180
},

the out put of the code is shown in attached images.....

Screamy
13 Dec 2010, 7:17 AM
Observations on your code sample:



You have three autoScroll: true attributes in your code. You only need one in metaDataPanel.
You don't need autoHeight: true in metaDataPanel. Remove it.
Your Form Panel contains bodyStyle : 'height:485px;'. This is forcing the height of your form panel to always be 485px, which is in direct conflict with metaDataPanel's layout of 'fit'.
Also, what's up with that iframe in metaDataPanel? It also has a fixed height...

Thx.

Entropy
13 Dec 2010, 7:49 AM
You also have two bodyStyle declarations.

I am looking at a similar problem to this, wherein we have a couple panels that OUGHT to autoscroll, but don't. One of them started working when no width, autoWidth, or autoHeight were set. I am wondering if autoScroll is incompatible with autoWidth/autoHeight or a percentage based width setting?

Anyway, the other panel where it fails is not responding even when we remove this attributes. Is it possible that if it has children with these setting that too might be incompatible?