Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i open popup window in ExtJS with formpanel only

I have the Form panel which constains the form with fields.

Now on click of button , i am opening the window and then adding form as item in window like this

win = new Ext.Window({
    title: 'Add',
    layout: 'fit',
    autoScroll: true,
    y: 120,
    width: 600,
    height: 600,
    modal: true,
    closeAction: 'hide',
    items: [formpanel]
});
win.show();

Now this shows two windows one shows the main window title Add and border and then one more frame of formpanel with title and borders.

Is there any way so that window only conatins form title and border but not windows title and border and background

Its like showuing only formPanle as popup , rather than formpanel inside window

like image 691
user191542 Avatar asked Nov 07 '13 02:11

user191542


1 Answers

Make it as floating and closable config to achieve your task.

closable:true will help you to appear cross button at corner as you require.

var myForm = new Ext.form.Panel({
    width: 500,
    height: 400,
    title: 'Foo',
    floating: true,
    closable : true
});
myForm.show();

I hope this will help.

like image 71
Hariharan Avatar answered Oct 20 '22 14:10

Hariharan