Results 1 to 3 of 3

Thread: ?????????????? Ext.Window???????????

  1. #1
    Ext JS Premium Member
    Join Date
    Jun 2010
    Posts
    29

    Default ?????????????? Ext.Window???????????

    ?????????????? Ext.Window????????????????????????????????????????????
    ????????????????????????????

    Ext?? version?3.3.?
    ???????????????????????????????????????????????

    Ext.ns( 'Ext.myapp' );
    Ext.myapp.Test = function( cfg ){
    Ext.apply( this, cfg );
    Ext.myapp.Test.superclass.constructor.call(this, { });
    };
    Ext.extend(Ext.myapp.Test, Ext.Panel, {
    initApp : function(){
    new Ext.Panel({
    border : true,
    layout:{type: 'hbox' },
    items : [
    new Ext.Button({ text: 'Button1'}),
    new Ext.Button({ text: 'Button2'})
    ]
    });
    }
    });

    ????????????????????????
    Ext.onReady(function(){
    var app = new Ext.myapp.Test();
    app.initApp();
    var panel = new Ext.Panel({
    items : [ app ]
    });
    extWin = new Ext.Window({
    title : "test",
    width: 400,
    height:300,
    modal:true,
    items: panel
    });
    extWin.show();
    });
    Attached Files Attached Files

  2. #2
    Sencha User mashiki's Avatar
    Join Date
    Oct 2007
    Location
    Japan
    Posts
    139

    Default

    ???????initApp()?????????????????????????????????????????

    Code:
       initApp : function(){
                new Ext.Panel({
                   border : true,
                   layout:{type: 'hbox' },
                   items : [
                             new Ext.Button({ text: 'Button1'}),
                             new Ext.Button({ text: 'Button2'})
                            ]
               });
         }
    ?????????????????
    http://dl.dropbox.com/u/28804093/extjs/MyPanel.html

    Code:
    Ext.onReady(function(){
    	Ext.ns( 'Ext.myapp' );
    	Ext.myapp.MyPanel = Ext.extend(Ext.Panel, {
    		constructor: function(config) {
    			Ext.myapp.MyPanel.superclass.constructor.call(this, Ext.apply({
    				border : true,
    				layout:'hbox',
    				items : [
    					{xtype:'button', text: 'Button1'},
    					{xtype:'button', text: 'Button2'}
    				]
    			}, config));
    		}
    	});
    	
    	var panel = new Ext.myapp.MyPanel();
    	var extWin = new Ext.Window({
    		title : "test",
    		width: 400,
    		height:300,
    		modal:true,
    		layout:'fit',
    		items: panel
    	});
    	extWin.show();
    });

  3. #3
    Ext JS Premium Member
    Join Date
    Jun 2010
    Posts
    29

    Default

    masiki????????????????

    ???????????????????????????????

    ???????????????????????????????????????????????
    ?????????????????????

    ???????

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •