PDA

View Full Version : Login form like Window



Mycoding
16 Jul 2011, 12:07 AM
Is it possible to do login form like window?
Like Ext.Msg.alert('Hello!','Hello there from Sencha Touch!',Ext.emptyFn);

mbalsam
18 Jul 2011, 1:46 AM
Have a look at the Kitchensink (http://dev.sencha.com/deploy/touch/examples/kitchensink/). Under 'User Interface/Overlays' there's an example for a prompt overlay. You can also inspect the source code there.

Mycoding
18 Jul 2011, 1:50 AM
Promt is realy cool but I want login form.

Actially I find in Sencha Touch in Action one really cute sample that looks at what I need.

mbalsam
18 Jul 2011, 2:35 AM
Then have a look at the Overlay code:



if (!this.popup) {
this.popup = new Ext.Panel({
floating: true,
modal: true,
centered: true,
width: 300,
height: 200,
styleHtmlContent: true,
scroll: 'vertical',
html: '<p>...</p>',
dockedItems: [{
dock: 'top',
xtype: 'toolbar',
title: 'Overlay Title'
}]
});
}
this.popup.show('pop');
If you take this as a starting point but extend Ext.form.FormPanel instead of Ext.Panel and add a textfield and a passwordfield you are almost there.

Mycoding
18 Jul 2011, 2:49 AM
Thank you very much.