1. #1
    Sencha Premium Member
    Join Date
    Jul 2011
    Posts
    109
    Vote Rating
    4
    john76543 is an unknown quantity at this point

      0  

    Default Auto sizing north region

    Auto sizing north region


    How to I make the 'north' panel size to it's contents?

    As shown, the north region has no height. If I set it using height:300 that works, but I want it to auto-size to contents. Thanks,

    Code:
    Ext.onReady(function ()
    {
    	var tabs = Ext.create('Ext.form.Panel', {
    		//height: 300,
    		region: "north",
    		border: false,
    		style: { border: 0 },
    		fieldDefaults: {
    			labelWidth: 75,
    			msgTarget: 'side'
    		},
    		defaults: {
    			anchor: '100%'
    		},
    
    
    		items: {
    			xtype: 'tabpanel',
    			activeTab: 0,
    			defaults: {
    				bodyStyle: 'padding:10px'
    			},
    
    
    			items: [{
    				title: 'Phone Numbers',
    				defaultType: 'textfield',
    
    
    				items: [{
    					fieldLabel: 'Home',
    					name: 'home',
    					value: '(888) 555-1212'
    				}, {
    					fieldLabel: 'Business',
    					name: 'business'
    				}, {
    					fieldLabel: 'Mobile',
    					name: 'mobile'
    				}, {
    					fieldLabel: 'Fax',
    					name: 'fax'
    				}]
    			}]
    		}
    	});
    
    
    	var grid = Ext.create('Ext.grid.Panel', {
    		region: 'center',
    		id: 'mainSection',
    		layout: 'fit',
    		columns: [{ text: "first" }, { text: "second"}]
    	});
    
    
    	Ext.create('Ext.container.Viewport', {
    		layout: 'border',
    		renderTo: Ext.getBody(),
    		items: [tabs, grid]
    	});
    });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,703
    Vote Rating
    749
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    This is working great in 4.1.0 beta3 but not 4.0.7
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Jul 2011
    Posts
    109
    Vote Rating
    4
    john76543 is an unknown quantity at this point

      0  

    Default


    I think I've solved my problem. If I make the north region layout: 'fit' that seems to fix it (although using tabs, the tab panels themselves need layout: 'auto' to make it work).

    This is on 4.0.7

    Thanks,

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar