-
11 May 2011 8:10 AM #1
autoHeight feature
autoHeight feature
Hello,
I'm trying to migrate to extJS 4 an application writen with extJS 3.3 and I can't find how to replace the autoHeight config option of the Panel. What is the correct way to automaticaly resize a Panel with extJS 4 when the browser is resized ?
thanks a lot.
-
11 May 2011 9:01 AM #2
have you tried putting layout: 'fit' on the container of the panel?
-
12 May 2011 4:07 AM #3
Yes I have tried this layout but it doesn't work like I want.
Here is my code :
It loads an image in a panel. The problem is I dont know the size of the image. With ExtJS 3.3 the autoHeight config option is perfect. The panel adjust automaticaly its size to the image. With ExtJS 4, this option is gone and I don't know how to do the same thing. I have the same problem with A GridPanel wich I want to be automatically resized when I resize the browser window.Code:var previewPanel = new Ext.Panel({ title: 'Aperçu', id: 'preview-panel', renderTo: 'apercu', width: '100%', layout: { type: 'fit' }, //height: 500, autoHeight: true, collapsible: false, items: [{ xtype: 'box', id: 'div-cadre-apercu', autoEl: { id: 'apercu', tag:"img", src: "apercu" + action + "?timestamp=" + (new Date().getTime()), border: "0", height: "100%" } }] });
-
12 May 2011 4:33 AM #4
Perhaps the align setting will help? I'm not sure, but it's worth a try.
Code:layout: { type: 'fit', align: 'stretch' }
-
12 May 2011 5:08 AM #5
-
12 May 2011 5:33 AM #6
It doesn't work. Only the title bar of the panel is visible.
-
12 May 2011 6:05 AM #7
I do know one thing, and that seems true in 4.0 - it's definitely easier to size child to parent than parent to child. I'm going to have to think about this more, because my inclination would be to say, "detect the rendering of the child, then size the Panel on your own", but that's unclean, and may indicate there's something I'm not considering in the framework.
stevil
-
13 May 2011 7:02 AM #8
I'd really like to get these properties/features back too. I have a window who's size has to be able to expand/contract depending upon whether the user expands/contracts a panel. Obviously, there are programmatic ways to accomplish this, but the autoHeight feature took care of this for me automatically, so upgrading to ExtJS4 has become much more problematic.
-
17 Jul 2011 10:33 PM #9
Hi All, so what is the final solution for did? I got the same problem. Any tips please.
-
17 Jul 2011 10:34 PM #10
Hi All, so what is the final solution? I got the same problem, did you fix it Pitivier?
Similar Threads
-
window autoHeight
By mjlecomte in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 31 Aug 2008, 7:45 AM -
TreeLoader: new feature request and patch to add this feature
By osantana in forum Community DiscussionReplies: 3Last Post: 12 Jun 2008, 9:42 AM -
Accordion Autoheight
By wekkaw in forum Ext 2.x: Help & DiscussionReplies: 11Last Post: 1 Feb 2008, 7:08 AM -
re-call autoHeight feature in tabs?
By ultrus in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 8 Jan 2008, 12:19 PM -
Tab autoHeight problem
By hawk_turner in forum Ext 2.x: Help & DiscussionReplies: 5Last Post: 26 Dec 2007, 7:21 AM


Reply With Quote
