Hybrid View
-
22 Jan 2013 9:29 AM #1
Unanswered: Sencha Touch nested formpanel height issue
Unanswered: Sencha Touch nested formpanel height issue
While building a view I tried to nest a formpanel followed by a panel in a panel.
So basically there is a nested structure like this:
Ext.Panel
--Ext.form.Panel
--Ext.Panel
The problem is, that the formpanel has no height. It would be nice if the formpanel would get the height it needs. Like height: auto in CSS.
Any ideas?
The code is the following:
Ext.define('MyApp.view.MyView', {extend: 'Ext.Panel',
xtype: 'myview',
config : {scrollable: true,
items : [{xtype: 'formpanel',items: [{
html: 'Content in formpanel'
}
]
},
{
xtype: 'panel',
items: [
{
html: "Content in panel"
}
]
}
]}});
Thanks in advance.
-
22 Jan 2013 10:02 AM #2
If you are adding the form panel directly to your app Viewport you should have no problem.
It automatically takes all the available screen size.
If you are adding it to a "Container", you should be sure that the container is configured to use a "fit" layout
In this way your FormPanel will be automatically stretched.Code:... layout: 'fit' ...
PS: Please wrap your code into forum code tags.Sencha Inc
Andrea Cammarata, Solutions Engineer
CEO at SIMACS
@AndreaCammarata
www.andreacammarata.com
github: https://github.com/AndreaCammarata


Reply With Quote