1. #1
    Sencha Premium Member
    Join Date
    Jul 2007
    Posts
    256
    Vote Rating
    1
    brookd is on a distinguished road

      0  

    Default Does hbox layout replace the RowFit Layout?

    Does hbox layout replace the RowFit Layout?


    Does anyone know if the new hbox layout in Ext3.0 can replace usage of Ext.ux.layout.RowFitLayout from http://extjs.com/forum/showthread.php?t=17116 ?

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Yes.. well vbox layout does. It's super flexible.

    It lays out in boxes going down the screen.

    Takes a bit of playing around to get used to the configs, but it is VERY good.

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    hbox takes the place of column layout.

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    96
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    While hbox/column and vbox/row-fit can be interchanged in most cases there is still a fundamental difference:
    hbox and vbox uses absolute positioning, but column layout is floating and row-fit is static.

    Absolute positioning can sometimes affect sizing in legacy layouts.

    Also, column layout can span multiple rows which hbox can't.

  5. #5
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Quote Originally Posted by Condor View Post

    Also, column layout can span multiple rows which hbox can't.
    It depends if you nest the rows in columns or columns in rows.

    If you have an hbox layout with 3 boxes (3 columns), the first one could be a Container with a vbox layout with two boxes (2 rows). The next two might just be Panels.

    So you have row spanning. I think with a bit of fiddling you can do most things.

  6. #6
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    96
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Yes, but with column layout it's easier, e.g.
    Code:
    layout: 'column',
    defaults: {
      columnWidth: .5
    },
    items: [{
      title: 'First row - left'
    },{
      title: 'First row - right'
    },{
      title: 'Second row - left'
    },{
      title: 'Second row - right'
    }]

Thread Participants: 2