I have a card layout set in my app.js. here’s the code;
...
launch: function() {
var vp = Ext.create('Ext.container.Viewport', {
layout: 'card',
items: [
{
xtype: 'doctor'
},
{
xtype:'nurse'
}
]
});
}, ...
and, the first view that will load. here’s the code;
Ext.define('RoyProject.view.user.Doctor', {
extend:'Ext.form.Panel',
alias : 'widget.doctor',
id:'docform',
defaultType: 'textfield',
items: [{
fieldLabel: 'Name',
name: 'name'
}],
buttons: [, {
text: 'Send',
action:'send'
}]
});
Since i am using card layout in the app.js, all the first view has got stretched out, and occupies the whole screen. Therefore, to get rid of this i thought to add a Panel and within that Panel to add my view (which is RoyProject.view.user.Doctor). Can someone help me to add this view into a Panel, without changing the logic of the code 🙂
I think you’re trying to solve wrong problem. You don’t need to enclose your
doctorpanel into another one. In general idea of nesting panels one inside another is bad…What you need to do is to either specify fixed width for your
doctorpanel or play is its layout to see which one fits you better.