Common ExtJSWindow methods. For more information, see. I. Attributes
Plain: boolean type. "true" indicates that the color must be consistent with the background color. The default value is false.
Resizable: boolean type, whether the user can adjust the size of the form. The default value is true, indicating that the size can be adjusted.
Maxinizable: boolean type. true indicates that the maximum button is displayed. The default value is false.
Maximized: boolean type. true indicates that the form is maximized when the form is displayed. The default value is false.
Closable: boolean type. true indicates that the close button is displayed. The default value is true.
BodyStyle: the spacing between the border and the border, for example, bodyStyle: "padding: 3px ".
ButtonAlign: Alignment of buttons (left, center, right) in the form. The default value is right.
CloseAction: "close" releases the memory occupied by the form, and "hide" hides the form. We recommend that you use "hide ".
Ii. Method
Show: Open the form.
Hide: hide a form.
Close: close the form.
Iii. Events
Show: Method of opening the form.
Hide: hide the method used to hide a form.
Close: method when the form is closed.
Iv. Application Examples
The Code is as follows:
Ext. onReady (function (){
Var _ window = new Ext. Window ({
Title: "login ",
RenderTo: Ext. getBody (),
Frame: true,
Plain: true,
Resizable: false,
ButtonAlign: "right ",
CloseAction: "hide ",
Maximizable: true,
Closable: true,
BodyStyle: "padding: 4px ",
Width: 310,
Height: 230,
Layout: "form ",
LableWidth: 45,
Defaults: {xtype: "textfield", width: 180 },
Items: [{fieldLabel: "Account" },{ fieldLabel: "password"}],
Buttons: [{text: "OK" },{ text: "canceled", handler: function () {_ window. hide () ;}}],
Listeners :{
"Show": function (){
Alert ("show ");
},
"Hide": function (){
Alert ("hide ");
},
"Close": function (){
Alert ("close ");
}
}
})
_ Window. show ();
})