ExtJS Create window Instance two

Source: Internet
Author: User

Ext.onready (function () {/** * description, add additional components to the Window, and perform related operations on the component */var win=new ext.window ({id: ' Mywin ', title: ' Form ', height:400, Width: ' 40% ', closable:false,//Disable Close button draggable:false,//tension drag resizable:false,//solid Fixed size, not allowed to stretch collapsible:true,//can be folded bodystyle: ' Background: #fff; padding:10px; ',//HTML: ' window content ' items:[{ID: ' panel_01 ',//Can be created by Xtype component xtype: ' Panel ', title: ' Panel ', Width: ' 100% ', height:200, HTML: ' Panel content '},{xtype: ' button ', Text: ' Buttons ',//click on   Shang trigger Handler's handler function Handler:function (BTN) {alert (Btn.text)}}]}) Win.show ();      Hide it first, continue with the following Operation Win.hide (); var win2=new Ext.window.Window ({id: ' myWin2 ', title: "title", height:400, width:400,//render to page Rendto:ex T.getbody (), tbar:[{text: ' button one ', Handler:function (BTN) {///by EXT provides a way to get the component that sets the ID alert (ext.getcmp ("Mywin 2 ").}},{Text: ' button two ', Handler:functioN (BTN) {//Select the ancestor's component by xtype or selector alert (btn.up ("window"). Title)}},{Text: ' button three ', Handler:function (btn {//Direct access to Parent component alert (Btn.ownerCt.ownerCt.title)}}]) Win2.show ()});

ExtJS Create window Instance two

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.