1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    397
    Vote Rating
    6
    gkatz is on a distinguished road

      0  

    Default hbox layout and align strech

    hbox layout and align strech


    Hi;
    It seems like using a strech property on with hbox layout does not strech the items vertically as it is supposed to. (using v1.0.1). note that if you just change the layout type of the root container in the code to 'vbox' the items strech to fill the container like they are supposed to.
    can someone please take a quick look to see what I am missing?

    simple code:
    Code:
    Ext.setup({
        icon: 'icon.png',
        tabletStartupScreen: 'tablet_startup.png',
        phoneStartupScreen: 'phone_startup.png',
        glossOnIcon: false,
        onReady: function() {
     
     
      var root = new Ext.Panel({
       fullscreen: true,
       style: 'background-color:green;',
       layout:{
        type:'hbox',
        align: 'strech'
     
       },
       defaults:{flex:'1'},
       items: [
        {
         xtype: 'panel',
         html: 'left',
         style: 'background-color:red;',
        },
        {
         xtype: 'panel',
         html: 'right',
         style: 'background-color:orange;',
        }
       ]
      });
        }
    });

  2. #2
    Sencha User
    Join Date
    Nov 2010
    Posts
    397
    Vote Rating
    6
    gkatz is on a distinguished road

      0  

    Default


    bumped;
    cant get past this simple issue.
    the API for hbox layout states:
    stretch : Components are stretched vertically to fill the container.
    yet the items do not strech vertically to fill it - they just strech for the height needed to display the items html.
    ahy help would be great.
    thanks

  3. #3
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,004
    Vote Rating
    650
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Code:
    align: 'stretch'
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  4. #4
    Sencha User
    Join Date
    Nov 2010
    Posts
    397
    Vote Rating
    6
    gkatz is on a distinguished road

      0  

    Default


    F@#$ me...
    thanks Evant, will try to post more meaningfull stuff next time

  5. #5
    Sencha User
    Join Date
    Dec 2012
    Posts
    1
    Vote Rating
    0
    AlexFirejack is on a distinguished road

      0  

    Default


    ..."the items do not stretch vertically to fill it"... But if I need vise versa?(need to fill all spases)

Similar Threads

  1. Align in HBOX panel.
    By anpegar in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 23 Dec 2010, 4:29 AM
  2. Align items in layout HBOX
    By aperez in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 6 Aug 2010, 3:17 AM
  3. [3.0 RC3]Issue with HBox layout and Align Middle
    By robertoroberto in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 6 Jul 2009, 12:43 AM
  4. How to strech an TextArea to fit a Tab?
    By franzisk in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 26 May 2007, 2:07 AM

Thread Participants: 2

Tags for this Thread