Results 1 to 2 of 2

Thread: layout hbox does not work in ST 2.1?

  1. #1
    Sencha User cntop@msn.com's Avatar
    Join Date
    Sep 2012
    Location
    Anhui, China
    Posts
    18
    Vote Rating
    0
      0  

    Default Answered: layout hbox does not work in ST 2.1?

    hey guys, i find some problem with layout:hbox. code below

    Code:
    var panel = Ext.create("Ext.Panel", {	layout: 'vbox',
    	items: [{
    		xtype: 'panel',
    		html: '111',
    		style: 'background-color:red;'
    	},
    	{
    		xtype: 'panel',
    		layout: 'hbox',
    		items: [{
    			xtype: 'panel',
    			html: '222',
    			style: 'background-color:green;'
    		},
    		{
    			xtype: 'panel',
    			html: '333',
    			style: 'background-color:blue;'
    		}]
    	}]
    });
    Ext.Viewport.add(panel);
    this code work in ST2.0, but in ST 2.1, these three panels layout vbox together.
    why?
    ???????????
    order, law, moral, natural

  2. You aren't giving the child items any size. Should use flex or width/height. Also, would recommend using this layout:

    Code:
    layout : {
        type  : 'vbox', //or 'hbox'
        align : 'stretch'
    }

  3. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,026
    Answers
    3976
    Vote Rating
    1367
      0  

    Default

    You aren't giving the child items any size. Should use flex or width/height. Also, would recommend using this layout:

    Code:
    layout : {
        type  : 'vbox', //or 'hbox'
        align : 'stretch'
    }
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Posting Permissions

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