1. #1
    Sencha Premium Member
    Join Date
    Jul 2011
    Posts
    119
    Vote Rating
    5
    john76543 is on a distinguished road

      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
    36,790
    Vote Rating
    833
    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
    119
    Vote Rating
    5
    john76543 is on a distinguished road

      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

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi