Ext 기본 시작

1544 단어 ExtJs
Ext.onReady(function(){
	var panel = new Ext.Panel({
        //el:'text',
        title:'MyPanel',
        collapsible:true,// 
        floating:true,// 
        draggable:true, // 
        html :'aaaaa',
        pageX :100,
        pageY :50,
        width: 500,
        height:300,
        titleCollapse: true,
        frame: true,// 
//        renderTo:Ext.getBody(),
        draggable: {
         insertProxy: true,// 

         onDrag : function(e){
             var pel = this.proxy.getEl();
             this.x = pel.getLeft(true);
             this.y = pel.getTop(true); // panel 

            var s = this.panel.getEl().shadow;
             if (s) {
                 s.realign(this.x, this.y, pel.getWidth(), pel.getHeight()); //shadow realign , shadow 
             }
         },
         endDrag : function(e){
             this.panel.setPosition(this.x, this.y);
         }
         },
         tbar:[{text:"button1"},{text:"button2"}], // 
         bbar:[{text:"button1"},{text:"button2"}],  // 
         buttons:[{text:"button1"},{text:"button2"}] //footer 
	});
	
	var tabs = new Ext.TabPanel({
	   renderTo: document.body,
	   height:100,
	   buttons:[{text:"back"},
	   	
	   		{text:"next"}]
	});
	
	tabs.add({
	   title:'title1',
	   html:' ',
	   closable:true
	});
	
   tabs.add({
       title:'title2',
       html:'html2',
       closable:true
    });
    tabs.activate(0);
});

좋은 웹페이지 즐겨찾기