-
8 Jul 2012 3:26 AM #1
Unanswered: define extend: Ext.window.Window does not rendered.
Unanswered: define extend: Ext.window.Window does not rendered.
Hi,
I am newbie, and about to make an analog to my current working alias ingestion from Viewport.js. So my Viewport.js is something like this:
... xtype: 'loginPanel'...
if the loginPanel.js (under view) is a panel or field container everything works fine, but not nice for a login window.
The panel one:
Ext.define('myApp.view.loginPanel',{
extend: 'Ext.panel.Panel',
alias: 'widget.loginPanel',
layout: {
type: 'vbox', // Arrange child items vertically
align: 'stretch', // Each takes up full width
padding: 5
},
height: 200,
width: 400,
...
And the window what is not doing:
Ext.define('myApp.view.loginPanel', {
extend : 'Ext.window.Window',
alias: 'widget.loginPanel',
title: 'Mywindow',
closeAction: 'hide',
width: 300,
height: 300,
layout: 'fit',
resizable: false,
draggable: true,
modal: true,
...
I hope you can help me, what I am doing wrong here. I have tried to explicit importing window.Window by required directive - just to be on a safer side. No luck. But I am still got the feeling it is related to xtype:'window'.
thx,
Zol
-
8 Jul 2012 11:23 AM #2Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,183
- Vote Rating
- 194
- Answers
- 433
I am not sure I understand .. is this what you mean?
Scott.Code:Ext.create('Ext.container.Viewport', { layout: 'border', items: [{ region: 'north', html: '<h1 class="x-panel-header">Page Title</h1>', border: false, margins: '0 0 5 0' }, { region: 'center', xtype: 'tabpanel' }] }); Ext.create('Ext.window.Window', { title: 'Hello', height: 200, width: 400, layout: 'fit', items: { // Let's put an empty grid in just to illustrate fit layout xtype: 'grid', border: false, columns: [{header: 'World'}], store: Ext.create('Ext.data.ArrayStore', {}) // A dummy empty data store } }).show();
-
8 Jul 2012 11:26 AM #3Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,183
- Vote Rating
- 194
- Answers
- 433
In using your define ...
Code:Ext.define('myApp.view.loginPanel', { // window details. ]); var win = Ext.create('myApp.view.loginPanel', { // }); // or you can place show here .. }).show(); as shown above win.show();Last edited by scottmartin; 8 Jul 2012 at 11:27 AM. Reason: fix code
-
9 Jul 2012 6:41 AM #4
thanks
thanks
Thank you Guys,
my mistake was trying to get login win w/o instantiate it. Finally my solution was a form.Panel and just aligned to center, looks like a modal windows, and enough for a login screen.
cu
-
15 Jul 2012 5:32 AM #5


Reply With Quote