Learning ExtJS Window Common methods _extjs

Source: Internet
Author: User
One, property
Plain: Boolean type, true to enforce consistency with background color, default value false.
Resizable: Boolean type, whether the user can resize the form, and the default value of TRUE indicates that the size can be resized.
Maxinizable: Boolean type, true to show Maximize button, default value is False.
Maximized: Boolean type, True indicates that the form is maximized when it is displayed, and the default value is False.
Closable: Boolean type, True indicates that the Close button is displayed, and the default value is true.
Bodystyle: Spacing with the border, such as: bodystyle: "padding:3px".
Buttonalign: The alignment of the button on the form (left, center, right), and the default value is yes.
Closeaction: "Close" frees up the form's memory, hide hides the form, and it is recommended that you use hide.

Second, the method
Show: Open the form.
Hide: Hides the form.
Close: Closes the form.

III. Events
Show: Touch method when opening a form.
Hide: The touch method when the form is hidden.
Close: Closes the form when the method is touched.

Iv. Examples of applications
Copy Code code as follows:

Ext.onready (function () {
var _window=new ext.window ({
Title: "Login",
RenderTo:Ext.getBody (),
Frame:true,
Plain:true,
Resizable:false,
Buttonalign: "Right",
C Loseaction: "Hide",
Maximizable:true,
Closable:true,
bodystyle: "padding:4px",
width:310,
Heig ht:230,
Layout: "Form",
Lablewidth:45,
Defaults:{xtype: "TextField", width:180},
Items:[{fieldlabel: " Account "},{fieldlabel:" Password "}",
Buttons:[{text: "OK"},{text: "Cancel", Handler:function () {_window.hide ();}}],
listeners:{
Show: function () {
Alert ("Display");
},
"Hide": function () {
Alert ("hidden");
},
"Close": function () {
Alert ("Off");
}
}
})
_window.show ();
})

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.