-
19 May 2011 6:30 AM #1
autoHeight/autoWidth: How is this done in ExtJS4 ?
autoHeight/autoWidth: How is this done in ExtJS4 ?
In ExtJS3 I used the autoHeight/autoWidth properties to let containers have the right dimensions.
How is this done using ExtJS4?
-
19 May 2011 7:25 AM #2
-
20 May 2011 12:12 AM #3
Layouts definitely play a big part in this, but content size can also contribute.
The idea is to supply autoHeight and/or autoWidth as before and don't set the width or height properties. This is like 3.x, but in 4.x the Panel and its DockLayout do set dimensions (based on measurements) to wrap the content in the proper bordering.
Sadly, there are some bugs (still open) on this. For one:
http://www.sencha.com/forum/showthread.php?133421
If you have an example that isn't working, please post it so we can see what might be wrong.Don Griffin
Ext JS Development Team Lead
Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue
"Use the source, Luke!"
-
20 May 2011 1:31 AM #4
tabpanel with autoHeight/autoWidth
tabpanel with autoHeight/autoWidth
Actually, I want a Tabpanel to resize itself depending on the Tab that is activated:
Code:xtype: 'tabpanel', autoWidth: true, autoHeight: true, items: [ { xtype: 'container', title: 'One', height: 100 }, { xtype: 'container', title: 'Two', height: 500 } ]
-
20 May 2011 1:33 AM #5
tabpanel with autoHeight/autoWidth
tabpanel with autoHeight/autoWidth
Actually, I want a Tabpanel to resize itself depending on the Tab that is activated:
The tabpanel only uses the first items height.Code:xtype: 'tabpanel', autoWidth: true, autoHeight: true, items: [ { xtype: 'container', title: 'One', height: 100 }, { xtype: 'container', title: 'Two', height: 500 } ]
-
20 May 2011 2:29 AM #6
If I remember correctly the solution in Ext3 was to set autoHeight: true on all child items (the tabs), not (necessarily) on the TabPanel itself.
Not sure if this still works in Ext4.
In my Ext3 project I used browser-managed layouts extensively, that is using the default layout for Containers/Panels and not specifying a custom layout, and it wasn't always straight forward to make things work.
I am currently in the process of migrating this app to Ext4, and I expect it to be a cumbersome process in regards to making these non-managed layouts work.
Please report your findings in this thread.
-
24 May 2011 10:30 PM #7
I still don't have any solution for the dynamic height of TabPanels. Nobody, who has used this in ExtJS3 and is now nailed down to have a fixed height in ExtJS4?
-
25 May 2011 6:26 AM #8
-
24 Jul 2012 5:37 AM #9
autoHeight=true can be probably replaced by manageHeight=false.
-
24 Jul 2012 10:32 AM #10
The old autoHeight config is equivalent to not specifying a "height" config and also not specifying any layout-specific configs (e.g., "flex"). In that case, the component is "auto height".
The manageHeight config instructs the dock layout to not write heights to the DOM basically. In theory this should be "better" but has issues at times. The primary reason we added it (and are working to resolve its issues), is it works with animations that effect the height. For example in the new tree picker.Don Griffin
Ext JS Development Team Lead
Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue
"Use the source, Luke!"


Reply With Quote