1. Code
<script type= "Text/javascript" >
Ext.onready (function () {
var win = new Ext.window ({
Title: ' Window ',
width:476,
height:374,
HTML: ' <div> here is the form content </div> ',
Resizable:true,
Modal:true,
Closable:true,
Maximizable:true,
Minimizable:true
});
Win.show ();
});
</script>
2. Description
(1) var win = new Ext.window ({}): Creates a new Window form object.
(2) Title: ' Window ': the title of the form.
(3) width:476,height:374: Width and height.
(4) HTML: ' <div> here is the form content </div> ': HTML content displayed inside the form.
(5) Resizable:true: Whether the size of the form can be resized, set to true here.
(6) Modal:true: Is modal form [what is modal form?] When you open this form, if you cannot manipulate other forms, the form is modal, otherwise it is a non-modal form.
(7) Closable:true: Whether it can be closed or not, it can also be understood as whether the Close button is displayed.
(8) Maximizable:true: Whether it can be maximized, or whether the Maximize button is displayed.
(9) Minimizable:true: Whether it can be minimized or not, it can also be understood as whether to display the Minimize button.
(Ten) Win.show (): Form show.
3.window components commonly used: properties, methods, and events
First, the attribute
Plain: Boolean type, True indicates that the force is reconciled with the background color, and the default value is 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 indicates that the Maximize button is displayed, and the default value is False.
Maximized: Boolean type, True indicates that the form is maximized when the form 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 to the border, such as: bodystyle: "padding:3px".
Buttonalign: The alignment of the button in the form (left, center, right), and the default value is yes.
Closeaction: "Close" frees the form to occupy the memory, "hide" hides the form and suggests "hide".
second, the method
Show: Open the form.
Hide: Hides the form.
Close: Closes the form.
Iii. Events
Show: Touch when the form is opened.
Hide: Hides the form when it touches the method.
Close: Touch method when closing the form.
ExtJS Learning-window, Windows components